]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/user/login_user_change_email_address.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / user / login_user_change_email_address.xhtml
index 1df0b8c34ba093a6f8609fdb43bb9caf73443090..e8f52fda3cd505ef762097d50292bf208a02fd72 100644 (file)
@@ -1,3 +1,4 @@
+<?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}"
@@ -7,61 +8,62 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
-       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
-               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_CHANGE_EMAIL_ADDRESS}</ui:define>
+       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
+               <ui:define name="login_title">
+                       <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_EMAIL_ADDRESS}" />
+               </ui:define>
 
                <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_EMAIL_ADDRESS}
+                       <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_EMAIL_ADDRESS}" />
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
-                               <div class="table">
-                                       <div class="table_header">
-                                               <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_ADDRESS_TITLE}" />
-                                       </div>
-
-                                       <h:form id="form_login_user_change_email_address">
-                                               <div class="para">
-                                                       <fieldset id="change_email">
-                                                               <legend title="#{msg.LOGIN_USER_CHANGE_EMAIL_LEGEND_TITLE}">
-                                                                       <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_LEGEND}" />
-                                                               </legend>
+                       <h:panelGroup styleClass="table" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('user_change_email_address')}">
+                               <div class="table_header">
+                                       <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
+                               </div>
 
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_OLD_ADDRESS}" />
-                                                                       </div>
+                               <h:form id="form_user_change_email_address">
+                                       <div class="para">
+                                               <fieldset class="fieldset" id="change_email">
+                                                       <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
+                                                               <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
+                                                       </legend>
 
-                                                                       <div class="table_right">
-                                                                               <h:outputText value="#{contactController.emailAddress}" />
-                                                                       </div>
+                                                       <div class="table_row">
+                                                               <div class="table_left">
+                                                                       <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" />
+                                                               </div>
 
-                                                                       <div class="clear"></div>
+                                                               <div class="table_right">
+                                                                       <h:outputText value="#{contactController.emailAddress}" />
                                                                </div>
 
-                                                               <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
-                                                       </fieldset>
-                                               </div>
+                                                               <div class="clear"></div>
+                                                       </div>
 
-                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+                                                       <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
+                                               </fieldset>
+                                       </div>
 
-                                               <div class="table_footer">
-                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doUserChangeEmailAddress()}" />
-                                               </div>
-                                       </h:form>
-                               </div>
-                       </ui:fragment>
+                                       <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
 
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+                                       <div class="table_footer">
+                                               <h:commandButton class="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" />
+                                       </div>
+                               </h:form>
+                       </h:panelGroup>
 
-                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
-                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_change_email_address')}">
+                               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                                       <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED}" />
+                                       <ui:param name="styleClass" value="errors" />
+                               </ui:include>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
-                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>