]> 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                 <widgets:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" messageStyleClass="alert-danger" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" />
21
22                 <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
23                         <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
24                 </ui:fragment>
25
26                 <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
27                         <h:form id="form_user_change_password">
28                                 <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
29                                         <div class="table-header">
30                                                 <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
31                                         </div>
32
33                                         <fieldset class="fieldset" id="change_password">
34                                                 <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
35                                                         <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
36                                                 </legend>
37
38                                                 <h:panelGroup styleClass="table-row" layout="block">
39                                                         <div class="table-left">
40                                                                 <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
41                                                         </div>
42
43                                                         <div class="table-right">
44                                                                 <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" />
45                                                         </div>
46                                                 </h:panelGroup>
47
48                                                 <h:panelGroup styleClass="error_container" layout="block">
49                                                         <h:message for="userPassword" errorClass="alert-danger" fatalClass="alert-danger" warnClass="alert-warning" />
50                                                 </h:panelGroup>
51
52                                                 <h:panelGroup styleClass="table-row" layout="block">
53                                                         <div class="table-left">
54                                                                 <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
55                                                         </div>
56
57                                                         <div class="table-right">
58                                                                 <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" />
59                                                         </div>
60                                                 </h:panelGroup>
61
62                                                 <h:panelGroup styleClass="error_container" layout="block">
63                                                         <h:message for="userPasswordRepeat" errorClass="alert-danger" fatalClass="alert-danger" warnClass="alert-warning" />
64                                                 </h:panelGroup>
65                                         </fieldset>
66
67                                         <!-- @TODO Get rid of this ugly class=para abuse -->
68                                         <div class="para"></div>
69
70                                         <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
71
72                                         <div class="table-footer">
73                                                 <h:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
74                                                 <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_USER_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
75                                         </div>
76                                 </h:panelGroup>
77                         </h:form>
78                 </ui:fragment>
79         </ui:define>
80 </ui:composition>