]> git.mxchange.org Git - addressbook-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 20:35:25 +0000 (22:35 +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
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

index de486b6388664e4bfe3aa545beddf71eed575393..1bfa9469394524e89e5472e27e4c6549008f3474 100644 (file)
@@ -1,7 +1,5 @@
 <?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
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+<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"
@@ -25,4 +23,4 @@
                        </div>
                </ui:fragment>
        </div>
-</html>
+</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 3cfd020c72ad60c1543b38d7c0f3fdf83e56b7db..ed55ac8bcb83ad1eb220b94b958bc3916782db34 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="emailAddress1" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL1}" />
-                                                                       </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="emailAddress2" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL2}" />
-                                                                       </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>