]> 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                                 xmlns:p="http://primefaces.org/ui">
9
10         <ui:define name="login_title">
11                 <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PASSWORD}" />
12         </ui:define>
13
14         <ui:define name="content_header">
15                 <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_PASSWORD}" />
16         </ui:define>
17
18         <ui:define name="content">
19                 <widgets:outputMessageBox id="login-user-must-change-password" message="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}" />
20
21                 <widgets:outputMessageBox id="error-user-edit-data-disabled" message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" messageStyleClass="alert-danger" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" />
22
23                 <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
24                         <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
25                 </ui:fragment>
26
27                 <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
28                         <h:form id="form_user_change_password">
29                                 <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
30                                         <div class="table-header">
31                                                 <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
32                                         </div>
33
34                                         <fieldset class="fieldset" id="change_password">
35                                                 <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
36                                                         <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
37                                                 </legend>
38
39                                                 <h:panelGroup styleClass="table-row" layout="block">
40                                                         <div class="table-left">
41                                                                 <p:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
42                                                         </div>
43
44                                                         <div class="table-right">
45                                                                 <p:inputText type="secret" styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" />
46                                                         </div>
47                                                 </h:panelGroup>
48
49                                                 <h:panelGroup styleClass="error-container" layout="block">
50                                                         <p:message for="userPassword" />
51                                                 </h:panelGroup>
52
53                                                 <h:panelGroup styleClass="table-row" layout="block">
54                                                         <div class="table-left">
55                                                                 <p:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
56                                                         </div>
57
58                                                         <div class="table-right">
59                                                                 <p:inputText type="secret" styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" />
60                                                         </div>
61                                                 </h:panelGroup>
62
63                                                 <h:panelGroup styleClass="error-container" layout="block">
64                                                         <p:message for="userPasswordRepeat" />
65                                                 </h:panelGroup>
66                                         </fieldset>
67
68                                         <!-- @TODO Get rid of this ugly class=para abuse -->
69                                         <div class="para"></div>
70
71                                         <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
72
73                                         <div class="table-footer">
74                                                 <p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
75                                                 <p:commandButton styleClass="submit" type="submit" id="button_change_password" value="#{msg.BUTTON_USER_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" />
76                                         </div>
77                                 </h:panelGroup>
78                         </h:form>
79                 </ui:fragment>
80         </ui:define>
81 </ui:composition>