]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/user/login_change_password.xhtml
Please cherry-pick:
[jjobs-war.git] / web / user / login_change_password.xhtml
index a4b50d33106682b687bc98e160f76d01ea037ec1..dc647b75027143a7434c02c5860ab863723a1f36 100644 (file)
@@ -8,13 +8,21 @@
        >
 
        <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="login_title">
+                       <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PASSWORD}" />
+               </ui:define>
 
                <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_PASSWORD}
+                       <h:outputText value="#{msg.CONTENT_TITLE_USER_LOGIN_CHANGE_PASSWORD}" />
                </ui:define>
 
                <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}">
+                               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                                       <ui:param name="message" value="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" />
+                               </ui:include>
+                       </ui:fragment>
+
                        <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
                                <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
                                        <div class="table_header">
 
                                                                <div class="table_row">
                                                                        <div class="table_left">
-                                                                               <h:outputLabel for="userCurrentPassword" value="#{msg.GUEST_REGISTRATION_ENTER_CURRENT_PASSWORD}" />
-                                                                       </div>
-
-                                                                       <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="clear"></div>
-                                                               </div>
-
-                                                               <div class="error_container">
-                                                                       <h:message for="userCurrentPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                                                               </div>
-
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                                               <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
                                                                        </div>
 
                                                                        <div class="table_right">
                                                                        <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="error_container">
+                                                               <h:panelGroup styleClass="error_container" layout="block">
                                                                        <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                                                               </div>
+                                                               </h:panelGroup>
 
                                                                <div class="table_row">
                                                                        <div class="table_left">
-                                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
                                                                        </div>
 
                                                                        <div class="table_right">
@@ -72,9 +64,9 @@
                                                                        <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="error_container">
+                                                               <h:panelGroup styleClass="error_container" layout="block">
                                                                        <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                                                               </div>
+                                                               </h:panelGroup>
                                                        </fieldset>
                                                </div>
 
 
                                                <div class="table_footer">
                                                        <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
+                                                       <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_USER_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
                                                </div>
                                        </h:form>
                                </h:panelGroup>
                        </ui:fragment>
 
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" />
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_password')}">
+                               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                                       <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" />
+                                       <ui:param name="styleClass" value="errors" />
+                               </ui:include>
+                       </ui:fragment>
 
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />