register-service.xhtml 3.01 KB
Newer Older
michael.simon's avatar
michael.simon committed
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
<?xml version='1.0' encoding='UTF-8' ?>
<!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:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:bw="http://www.scc.kit.edu/bwfacelets"
	xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
<f:view>
	<f:metadata>
		<f:viewParam name="serviceId" value="#{registerServiceBean.id}"/>
		<f:viewParam name="ssn" value="#{registerServiceBean.serviceShortName}"/>
		<f:event type="javax.faces.event.PreRenderViewEvent"
            listener="#{registerServiceBean.preRenderView}" />
	</f:metadata>

<ui:composition template="/template/default.xhtml">
	<ui:param name="title" value="#{messages.title}"/>

	<ui:define name="content">
	
michael.simon's avatar
michael.simon committed
27
	<h:form id="form" class="full fancy form">
michael.simon's avatar
michael.simon committed
28
29
30
31
32
		<h2><h:outputText value="#{messages.register}: #{registerServiceBean.service.name}"/></h2>

		<h:panelGroup rendered="#{registerServiceBean.errorState}">
			<div class="panel">
				<p:panel header="#{messages.error}">
33
					<p:messages id="messageErrorState" for="errorState" showDetail="true" escape="false" />
michael.simon's avatar
michael.simon committed
34
35
36
37
38
				</p:panel>
			</div>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{! registerServiceBean.errorState}">	
michael.simon's avatar
michael.simon committed
39
40
41
42
43
44
45
46
47
48
			<p:panel rendered="#{! registerServiceBean.accessAllowed}">
				<h:outputText value="#{messages.requirements_unsatisfied}" />
				<p:messages id="messageBoxReqs" for="reqs" showDetail="true" escape="false" />
			</p:panel>

			<p:panel id="blockPanel">
				<p:outputPanel rendered="#{registerServiceBean.policyHolderList.size() gt 0}">
					<b>Um sich für den Dienst zu registrieren, müssen Sie den folgenden Nutzungsbedingungen 
					zustimmen.</b>
				</p:outputPanel>
michael.simon's avatar
michael.simon committed
49

michael.simon's avatar
michael.simon committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
				<p:messages id="messageBox" for="need_check" showDetail="true" escape="false" />
			
				<div style="margin: 1.5em 0.5em;">
					<ui:repeat var="policyHolder" value="#{registerServiceBean.policyHolderList}">
						<b><h:outputText value="#{policyHolder.policy.name} - #{policyHolder.policy.actualAgreement.name}" /></b>
						<div style="margin-top: 1em;">
							<h:outputText value="#{bbCodeConverter.convert(policyHolder.policy.actualAgreement.agreement)}" escape="false"/>
						</div>
						<div style="margin-top: 1em;">
							<h:selectBooleanCheckbox value="#{policyHolder.checked}" />
							<h:outputText value="#{messages.accept_tou}" />
						</div>
					</ui:repeat>
				</div>
michael.simon's avatar
michael.simon committed
64
				
michael.simon's avatar
michael.simon committed
65
66
67
68
69
70
71
				<p:commandButton id="save" action="#{registerServiceBean.registerUser}" value="#{messages.register}"
					update="messageBox" disabled="#{! registerServiceBean.accessAllowed}"  />
			</p:panel>

			<p:blockUI block="blockPanel" trigger="save">  
       			<p:graphicImage value="#{resource['/img/ajax-loader.gif']}" alt="#{messages.loading}" />  
			</p:blockUI>					
michael.simon's avatar
michael.simon committed
72
73
74
75
76
77
78
79
80
		</h:panelGroup>
		
	</h:form>

	</ui:define>
</ui:composition>
</f:view>		
</body>
</html>