createwizard.xhtml
3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:event type="preRenderView" listener="#{tournamentCreateView.initView()}" />
</f:metadata>
<ui:define name="content">
<h1>#{i18n['tournaments.admin.create_tournament']}</h1>
<h:form>
<p:wizard widgetVar="wiz" flowListener="#{tournamentCreateView.onFlowProcess}">
<p:tab id="selectGame" title="#{i18n['tournaments.admin.select_a_game']}">
<p:panel>
<h:messages errorClass="error" />
<h:panelGroup rendered="#{tournamentCreateView.tournamentGames.isEmpty() eq false}">
<h2>#{i18n['tournaments.admin.select_a_game']}</h2>
<h:selectOneMenu value="#{tournamentCreateView.game}" converter="#{tournamentGameConverter}">
<f:selectItems var="game" itemLabel="#{game.name}" value="#{tournamentCreateView.tournamentGames}" itemValue="#{game.id}" />
</h:selectOneMenu>
</h:panelGroup>
<h2>#{i18n['tournaments.admin.create_a_game']}</h2>
<h:panelGrid columns="2">
<h:outputText value="#{i18n['tournaments.admin.game_name']}" />
<h:outputText value="#{i18n['tournaments.admin.game_description']}" />
<p:inputText value="#{tournamentCreateView.tournamentGameName}" />
<p:inputText value="#{tournamentCreateView.tournamentGameDescription}" />
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="selectRuleset" title="#{i18n['tournaments.admin.rules']}">
<p:panel>
<h:messages errorClass="error" />
<h:panelGroup rendered="#{tournamentCreateView.tournamentRules.isEmpty() eq false}">
<h2>#{i18n['tournaments.admin.select_a_ruleset']}</h2>
<h:selectOneMenu value="#{tournamentCreateView.rules}" converter="#{tournamentRuleConverter}">
<f:selectItems var="rule" itemLabel="#{rule.name}" value="#{tournamentCreateView.tournamentRules}" itemValue="#{rule.id}" />
</h:selectOneMenu>
</h:panelGroup>
<br />
<h2>#{i18n['tournaments.admin.create_new_ruleset']}</h2>
<h:outputText value="#{i18n['tournaments.ruleset_name']}" />
<br />
<p:inputText value="#{tournamentCreateView.rulesetName}" />
<br />
<h:outputText value="#{i18n['tournaments.ruleset_description']}" />
<br />
<p:inputTextarea value="#{tournamentCreateView.rulesetDescription}"/>
</p:panel>
</p:tab>
<p:tab id="selectRegTimes" title="#{i18n['tournaments.admin.set_time_constraints']}">
<p:panel>
<h:messages errorClass="error" />
<h2>#{i18n['tournaments.admin.registration_time_constraints']}</h2>
<h:panelGrid columns="2">
<h:outputText value="#{i18n['tournaments.registration_opens']}" />
<h:outputText value="#{i18n['tournaments.registration_closes']}" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
</h:panelGrid>
<h2>#{i18n['tournaments.admin.begin_time_constraints']}</h2>
<h:panelGrid>
<h:outputText value="Start time" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
</h:panelGrid>
</p:panel>
<div style="float: right;">
<p:commandButton icon="apply" value="#{i18n['tournaments.admin.create_tournament']}" />
</div>
</p:tab>
</p:wizard>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>