]> git.mxchange.org Git - jjobs-war.git/blob - web/user/login_user_change_password.xhtml
Please cherry-pick:
[jjobs-war.git] / web / user / login_user_change_password.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"
3                                 xmlns="http://www.w3.org/1999/xhtml"
4                                 xmlns:widgets="http://mxchange.org/jsf/core/widgets"
5                                 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
6                                 xmlns:h="http://xmlns.jcp.org/jsf/html"
7                                 xmlns:f="http://xmlns.jcp.org/jsf/core">
8
9         <ui:define name="login_title">
10                 <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PASSWORD}" />
11         </ui:define>
12
13         <ui:define name="content_header">
14                 <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_PASSWORD}" />
15         </ui:define>
16
17         <ui:define name="content">
18                 <widgets:outputMessageBox message="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}" />
19
20                 <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
21                         <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
22                                 <div class="table_header">
23                                         <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
24                                 </div>
25
26                                 <h:form id="form_user_change_password">
27
28                                         <fieldset class="fieldset" id="change_password">
29                                                 <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
30                                                         <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
31                                                 </legend>
32
33                                                 <h:panelGroup styleClass="table_row" layout="block">
34                                                         <div class="table_left">
35                                                                 <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
36                                                         </div>
37
38                                                         <div class="table_right">
39                                                                 <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" />
40                                                         </div>
41
42                                                         <div class="clear"></div>
43                                                 </h:panelGroup>
44
45                                                 <h:panelGroup styleClass="error_container" layout="block">
46                                                         <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
47                                                 </h:panelGroup>
48
49                                                 <h:panelGroup styleClass="table_row" layout="block">
50                                                         <div class="table_left">
51                                                                 <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
52                                                         </div>
53
54                                                         <div class="table_right">
55                                                                 <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" />
56                                                         </div>
57
58                                                         <div class="clear"></div>
59                                                 </h:panelGroup>
60
61                                                 <h:panelGroup styleClass="error_container" layout="block">
62                                                         <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" />
63                                                 </h:panelGroup>
64                                         </fieldset>
65
66                                         <div class="para"></div>
67
68                                         <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
69
70                                         <div class="table_footer">
71                                                 <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
72                                                 <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_USER_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
73                                         </div>
74                                 </h:form>
75                         </h:panelGroup>
76                 </ui:fragment>
77
78                 <widgets:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" />
79
80                 <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
81                         <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
82                 </ui:fragment>
83         </ui:define>
84 </ui:composition>