]> git.mxchange.org Git - addressbook-war.git/blob - web/user/login_user_change_password.xhtml
Updated copyright year
[addressbook-war.git] / web / user / login_user_change_password.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition
3         template="/WEB-INF/templates/login/user/user_base.tpl"
4         xmlns="http://www.w3.org/1999/xhtml"
5         xmlns:core="http://mxchange.org/jsf/core/widgets"
6         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
7         xmlns:h="http://xmlns.jcp.org/jsf/html"
8         xmlns:p="http://primefaces.org/ui"
9         >
10
11         <ui:define name="document_login_title">
12                 <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PASSWORD}" />
13         </ui:define>
14
15         <ui:define name="login_content_header">
16                 <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_PASSWORD}" />
17         </ui:define>
18
19         <ui:define name="content">
20                 <core:outputMessageBox
21                         panelGroupId="loginUserMustChangePassword"
22                         message="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}"
23                         rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}"
24                         />
25
26                 <core:outputMessageBox
27                         panelGroupId="errorUserEditDataDisabled"
28                         message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}"
29                         messageStyleClass="alert-danger"
30                         rendered="#{not featureController.isFeatureEnabled('change_user_password')}"
31                         />
32
33                 <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
34                         <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
35                 </ui:fragment>
36
37                 <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
38                         <h:form>
39                                 <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
40                                         <div class="table-header">
41                                                 <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
42                                         </div>
43
44                                         <fieldset class="fieldset">
45                                                 <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
46                                                         <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
47                                                 </legend>
48
49                                                 <h:panelGroup styleClass="table-row" layout="block">
50                                                         <div class="table-left">
51                                                                 <p:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
52                                                         </div>
53
54                                                         <div class="table-right">
55                                                                 <p:inputText type="secret" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" />
56                                                         </div>
57                                                 </h:panelGroup>
58
59                                                 <h:panelGroup styleClass="error-container" layout="block">
60                                                         <p:message for="userPassword" />
61                                                 </h:panelGroup>
62
63                                                 <h:panelGroup styleClass="table-row" layout="block">
64                                                         <div class="table-left">
65                                                                 <p:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
66                                                         </div>
67
68                                                         <div class="table-right">
69                                                                 <p:inputText type="secret" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" />
70                                                         </div>
71                                                 </h:panelGroup>
72
73                                                 <h:panelGroup styleClass="error-container" layout="block">
74                                                         <p:message for="userPasswordRepeat" />
75                                                 </h:panelGroup>
76                                         </fieldset>
77
78                                         <!-- @TODO Get rid of this ugly class=para abuse -->
79                                         <div class="para"></div>
80
81                                         <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
82
83                                         <p:panelGrid columns="2" layout="grid">
84                                                 <p:commandButton
85                                                         type="reset"
86                                                         value="#{msg.BUTTON_RESET_FORM}"
87                                                         />
88
89                                                 <p:commandButton
90                                                         type="submit"
91                                                         value="#{msg.BUTTON_USER_CHANGE_PASSWORD}"
92                                                         action="#{userPasswordController.doChangePassword()}"
93                                                         />
94                                         </p:panelGrid>
95                                 </h:panelGroup>
96                         </h:form>
97                 </ui:fragment>
98         </ui:define>
99 </ui:composition>