reserve.xhtml
4.41 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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:f="http://java.sun.com/jsf/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
>
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition template="/layout/template.xhtml">
<f:metadata>
<f:viewParam name="locid" value="#{requestCalendarView.locid}" />
<f:viewParam name="slotid" value="#{requestCalendarView.slotid}" />
<f:event type="preRenderView" listener="#{requestCalendarView.reserveCell()}" />
</f:metadata>
<ui:define name="content">
<h:form id="reserveField">
<h:panelGrid columns="3">
<h:outputLabel for="name" value="#{i18n['reservation.location']}" />
<h:outputText id="name" value="#{calendarView.reservation.location.name}" />
<h:message for="name" />
<h:outputLabel for="resdate" value="#{i18n['reservation.date']}:" />
<h:outputText id="resdate" value="#{calendarView.reservation.reservationDate.time}">
<f:convertDateTime timeZone="#{userprefs.timezone}" pattern="#{sessionHandler.datePattern}" />
</h:outputText>
<h:message for="resdate" />
<h:outputLabel for="starttime" value="#{i18n['reservation.start']}:" />
<h:outputText id="starttime" value="#{calendarView.reservation.slot.startTime.time}">
<f:convertDateTime timeZone="#{userprefs.timezone}" pattern="#{sessionHandler.timePattern}" />
</h:outputText>
<h:message for="starttime" />
<h:outputLabel for="selectone" value="#{i18n['reservation.end']}:" />
<h:selectOneMenu id="selectone" converter="#{reservationSlotConverter}" value="#{calendarView.reservationEndtime}">
<f:selectItems var="time" itemLabel="#{timeConverter.getEndTime(time)}" value="#{calendarView.availableTimes}" />
</h:selectOneMenu>
<h:message for="selectone" />
<h:outputLabel for="reserver" value="#{i18n['reservation.reserver']}:" />
<h:inputText id="reserver" value="#{calendarView.reservation.reserverName}"
required="#{!sessionHandler.hasPermission('CALENDAR_MANAGE')}"
/>
<h:message for="reserver" />
<h:outputLabel for="reserverlastname" value="#{i18n['reservation.reserverLastname']}:" />
<h:inputText id="reserverlastname" value="#{calendarView.reservation.reserverLastname}"
required="#{!sessionHandler.hasPermission('CALENDAR_MANAGE')}"
/>
<h:message for="reserverlastname" />
<h:outputLabel for="email" value="#{i18n['reservation.email']}:" />
<h:inputText id="email" value="#{calendarView.reservation.email}"
required="#{!sessionHandler.hasPermission('CALENDAR_MANAGE')}"
/>
<h:message for="email" />
<h:outputLabel for="phone" value="#{i18n['reservation.phone']}:" />
<h:inputText id="phone" value="#{calendarView.reservation.phone}"
required="#{!sessionHandler.hasPermission('CALENDAR_MANAGE')}"
/>
<h:message for="phone" />
<h:commandButton action="#{calendarView.reservePlace()}" value="#{i18n['reservation.reserve']}" />
<h:outputText />
<h:outputText />
<h:commandButton rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}"
action="#{calendarView.checkRepeat()}" value="Toisto"
/>
<h:outputLabel rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}" for="repeatStart"
value="#{i18n['repeat.end']}:"
/>
<h:inputText rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}" id="repeatStart"
value="#{calendarView.repeatEnd.time}"
>
<f:convertDateTime timeZone="#{userprefs.timezone}" pattern="#{sessionHandler.datePattern}" />
</h:inputText>
<h:message for="repeatStart" rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}" />
<h:selectManyCheckbox rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}"
converter="#{reservationLocationConverter}" layout="pageDirection" id="locations"
value="#{calendarView.selectedLocations}"
>
<f:selectItems var="location" itemLabel="#{location.name}" value="#{calendarView.availableLocations}" />
</h:selectManyCheckbox>
</h:panelGrid>
<h:commandButton rendered="#{sessionHandler.hasPermission('CALENDAR_MANAGE')}"
action="#{calendarView.checkRepeat()}" value="Toisto"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>