- 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>
<?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"
</div>
</ui:fragment>
</div>
-</html>
+</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="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>