]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued generally:
authorRoland Häder <roland@mxchange.org>
Fri, 13 May 2016 09:11:18 +0000 (11:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 13 May 2016 19:44:03 +0000 (21:44 +0200)
- moved email address (with repeat) to own templates, one for registration, one for login (change email address)
- added validator for above data
- some other fixes, e.g. wrong controller

Signed-off-by: Roland Häder <roland@mxchange.org>
web/WEB-INF/templates/generic/message_box.tpl [new file with mode: 0644]
web/WEB-INF/templates/generic/profile_mode_selection_box.tpl
web/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
web/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl [new file with mode: 0644]
web/user/login_change_email_address.xhtml

diff --git a/web/WEB-INF/templates/generic/message_box.tpl b/web/WEB-INF/templates/generic/message_box.tpl
new file mode 100644 (file)
index 0000000..1bfa946
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <div class="message_box">
+               <div class="message_header">
+                       #{msg.MESSAGE_BOX_TITLE}
+               </div>
+
+               <ui:fragment id="output_message" rendered="#{not empty message}">
+                       <div class="okay para">
+                               #{message}
+                       </div>
+               </ui:fragment>
+
+               <ui:fragment id="output_message" rendered="#{empty message}">
+                       <div class="errors para">
+                               #{msg.MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY}
+                       </div>
+               </ui:fragment>
+       </div>
+</ui:composition>
index 307999163ea9eb845609dea9c4bac6b33c8e1fa2..680c63eb9e9651be60f57aee9639c92e42f29551 100644 (file)
@@ -6,6 +6,6 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
        <h:selectOneMenu styleClass="select" id="profileMode" value="#{userController.userProfileMode}">
-               <f:selectItems value="#{profileModeController.allProfileModes}" var="m" itemValue="#{m}" itemLabel="#{msg[m.messageKey]}" />
+               <f:selectItems value="#{profileModeController.allProfileModes}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" />
        </h:selectOneMenu>
 </ui:composition>
diff --git a/web/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl b/web/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl
new file mode 100644 (file)
index 0000000..a3a69c0
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <div class="table_row">
+               <div class="table_left">
+                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
+               </div>
+
+               <div class="table_right">
+                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" validator="EmailAddressValidator" />
+               </div>
+
+               <div class="clear"></div>
+       </div>
+
+       <div class="table_row">
+               <div class="table_left">
+                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
+               </div>
+
+               <div class="table_right">
+                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" validator="EmailAddressValidator" />
+               </div>
+
+               <div class="clear"></div>
+       </div>
+</ui:composition>
index a1c7223d913add429e17bb712700531da80afb93..b8106fdfea9f0238af00249f80061f92a9140747 100644 (file)
                                                </div>
                                        </ui:fragment>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
-                                               </div>
-
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" />
-                                               </div>
-
-                                               <div class="clear"></div>
-                                       </div>
-
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
-                                               </div>
-
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" />
-                                               </div>
-
-                                               <div class="clear"></div>
-                                       </div>
+                                       <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
                                        <ui:fragment rendered="#{userController.isUserNameRequired()}">
                                                <div class="para"></div>
index d4e1e9d89656d00c3791a60ffa0305ca564dd57e..043babe7dc4f839a4c601aab042db05f0d524445 100644 (file)
                                                </div>
                                        </ui:fragment>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
-                                               </div>
-
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" />
-                                               </div>
-
-                                               <div class="clear"></div>
-                                       </div>
-
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
-                                               </div>
-
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" />
-                                               </div>
-
-                                               <div class="clear"></div>
-                                       </div>
+                                       <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
                                        <ui:fragment rendered="#{userController.isUserNameRequired()}">
                                                <div class="para"></div>
diff --git a/web/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl b/web/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl
new file mode 100644 (file)
index 0000000..3ca9f12
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <div class="table_row">
+               <div class="table_left">
+                       <h:outputLabel for="emailAddress" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL}" />
+               </div>
+
+               <div class="table_right">
+                       <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{emailChangeController.emailAddress}" required="true" validator="EmailAddressValidator" />
+               </div>
+
+               <div class="clear"></div>
+       </div>
+
+       <div class="table_row">
+               <div class="table_left">
+                       <h:outputLabel for="emailAddressRepeat" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT}" />
+               </div>
+
+               <div class="table_right">
+                       <h:inputText class="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{emailChangeController.emailAddressRepeat}" required="true" validator="EmailAddressValidator" />
+               </div>
+
+               <div class="clear"></div>
+       </div>
+</ui:composition>
index dd8affffb645cc300d4f2195a58ccb6fff974150..4d70ccb0b27f1d5978fd6d39f5c6fe0b7812225c 100644 (file)
                                                                        </div>
 
                                                                        <div class="table_right">
-                                                                               #{userController.emailAddress}
+                                                                               #{contactController.emailAddress}
                                                                        </div>
 
                                                                        <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputLabel for="emailAddress" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL}" />
-                                                                       </div>
-
-                                                                       <div class="table_right">
-                                                                               <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{emailChangeController.emailAddress}" required="true" />
-                                                                       </div>
-
-                                                                       <div class="clear"></div>
-                                                               </div>
-
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputLabel for="emailAddressRepeat" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT}" />
-                                                                       </div>
-
-                                                                       <div class="table_right">
-                                                                               <h:inputText class="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{emailChangeController.emailAddressRepeat}" required="true" />
-                                                                       </div>
-
-                                                                       <div class="clear"></div>
-                                                               </div>
+                                                               <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
                                                        </fieldset>
                                                </div>