]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/user/login_change_password.xhtml
updated jar(s)
[pizzaservice-war.git] / web / user / login_change_password.xhtml
index e4c623c1f957994ef120297b9a8087eebaf9ecff..847c662334024ff2ab811d0b9d644da3fa7a8785 100644 (file)
@@ -1,14 +1,13 @@
-<?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}"
        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"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
-       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
+       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_PASSWORD}</ui:define>
 
                <ui:define name="content_header">
 
                <ui:define name="content">
                        <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                               <div class="table">
-                                       <div class="table_header">
-                                               #{msg.LOGIN_CHANGE_PASSWORD_TITLE}
-                                       </div>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('change_user_password')}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
+                                               </div>
+
+                                               <h:form id="form_user_change_password">
+                                                       <div class="para">
+                                                               <fieldset id="change_password">
+                                                                       <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
+                                                                               <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
+                                                                       </legend>
+
+                                                                       <div class="table_row">
+                                                                               <div class="table_left">
+                                                                                       <h:outputLabel for="userCurrentPassword" value="#{msg.GUEST_REGISTRATION_ENTER_CURRENT_PASSWORD}" />
+                                                                               </div>
 
-                                       <h:form id="login_form">
-                                               <div class="para">
-                                                       <fieldset id="change_password">
-                                                               <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}</legend>
+                                                                               <div class="table_right">
+                                                                                       <h:inputSecret styleClass="input" id="userCurrentPassword" size="10" maxlength="255" value="#{userPasswordController.userCurrentPassword}" required="true" requiredMessage="#{msg.USER_CURRENT_PASSWORD_REQUIRED}" />
+                                                                               </div>
 
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputLabel for="password1" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD1}" />
+                                                                               <div class="clear"></div>
                                                                        </div>
 
-                                                                       <div class="table_right">
-                                                                               <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{userLoginController.userPassword}" required="true" />
+                                                                       <div class="error_container">
+                                                                               <h:message for="userCurrentPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
                                                                        </div>
 
-                                                                       <div class="clear"></div>
-                                                               </div>
+                                                                       <div class="table_row">
+                                                                               <div class="table_left">
+                                                                                       <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                                               </div>
 
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputLabel for="password2" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD2}" />
+                                                                               <div class="table_right">
+                                                                                       <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" />
+                                                                               </div>
+
+                                                                               <div class="clear"></div>
                                                                        </div>
 
-                                                                       <div class="table_right">
-                                                                               <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{userLoginController.userPasswordRepeat}" required="true" />
+                                                                       <div class="error_container">
+                                                                               <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
                                                                        </div>
 
-                                                                       <div class="clear"></div>
-                                                               </div>
-                                                       </fieldset>
-                                               </div>
+                                                                       <div class="table_row">
+                                                                               <div class="table_left">
+                                                                                       <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                                               </div>
 
-                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+                                                                               <div class="table_right">
+                                                                                       <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" />
+                                                                               </div>
 
-                                               <div class="table_footer">
-                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton class="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userController.changePassword()}" />
-                                               </div>
-                                       </h:form>
-                               </div>
-                       </ui:fragment>
+                                                                               <div class="clear"></div>
+                                                                       </div>
+
+                                                                       <div class="error_container">
+                                                                               <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                                                                       </div>
+                                                               </fieldset>
+                                                       </div>
+
+                                                       <div class="table_footer">
+                                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                               <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
+                                                       </div>
+                                               </h:form>
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
+
+                                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" />
+                               </ui:fragment>
 
-                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
-                               <ui:include src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
-                       </ui:fragment>
+                               <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                                       <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+                               </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>