- 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>
--- /dev/null
+<?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>
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>
--- /dev/null
+<?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>
</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>
</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>
--- /dev/null
+<?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>
</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>