]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/user/admin_user_unlock.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / admin / user / admin_user_unlock.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition template="/WEB-INF/templates/admin/admin_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="metadata">
10                 <f:metadata>
11                         <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
12                         <f:viewAction onPostback="true" action="#{beanHelper.notifyControllerUserConverted()}" />
13                 </f:metadata>
14         </ui:define>
15
16         <ui:define name="admin_title">
17                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}" />
18         </ui:define>
19
20         <ui:define name="content_header">
21                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}" />
22         </ui:define>
23
24         <ui:define name="content">
25                 <widgets:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" />
26
27                 <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
28                         <h:panelGroup styleClass="table_medium" layout="block">
29                                 <div class="table_header">
30                                         <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
31                                                 <f:param value="#{beanHelper.user.userName}" />
32                                                 <f:param value="#{beanHelper.user.userId}" />
33                                         </h:outputFormat>
34                                 </div>
35
36                                 <h:panelGroup styleClass="para" layout="block">
37                                         <div class="table_data_label">
38                                                 <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" />
39                                         </div>
40
41                                         <div class="table_data_field">
42                                                 <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}">
43                                                         <f:param name="userId" value="#{beanHelper.user.userId}" />
44                                                 </h:link>
45                                         </div>
46                                 </h:panelGroup>
47
48                                 <h:panelGroup styleClass="para" layout="block">
49                                         <div class="table_data_label">
50                                                 <h:outputLabel for="contactPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
51                                         </div>
52
53                                         <div class="table_data_field">
54                                                 <h:outputText id="contactPersonalTitle" value="#{msg[beanHelper.user.userContact.contactPersonalTitle.messageKey]}" />
55                                         </div>
56                                 </h:panelGroup>
57
58                                 <h:panelGroup styleClass="para" layout="block">
59                                         <div class="table_data_label">
60                                                 <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
61                                         </div>
62
63                                         <div class="table_data_field">
64                                                 <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
65                                         </div>
66                                 </h:panelGroup>
67
68                                 <h:panelGroup styleClass="para" layout="block">
69                                         <div class="table_data_label">
70                                                 <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
71                                         </div>
72
73                                         <div class="table_data_field">
74                                                 <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
75                                         </div>
76                                 </h:panelGroup>
77
78                                 <h:panelGroup styleClass="para" layout="block">
79                                         <div class="table_data_label">
80                                                 <h:outputLabel for="userLastLocked" value="#{msg.ADMIN_USER_LAST_LOCKED}" />
81                                         </div>
82
83                                         <div class="table_data_field">
84                                                 <h:outputText id="userLastLocked" value="#{beanHelper.user.userLastLocked.time}">
85                                                         <f:convertDateTime for="userLastLocked" type="both" />
86                                                 </h:outputText>
87                                         </div>
88                                 </h:panelGroup>
89
90                                 <h:panelGroup styleClass="para" layout="block">
91                                         <div class="table_data_label">
92                                                 <h:outputLabel for="userLockReason" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />
93                                         </div>
94
95                                         <div class="table_data_field">
96                                                 <h:outputText id="userLockReason" value="#{beanHelper.user.userLastLockedReason}" />
97                                         </div>
98                                 </h:panelGroup>
99
100                                 <div class="table_footer">
101                                         <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
102
103                                         <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount()}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" />
104                                 </div>
105                         </h:panelGroup>
106                 </h:form>
107
108                 <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
109                         <f:param value="#{beanHelper.user.userName}" />
110                         <f:param value="#{beanHelper.user.userId}" />
111                 </h:outputFormat>
112
113                 <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
114                         <f:param value="#{beanHelper.user.userName}" />
115                         <f:param value="#{beanHelper.user.userId}" />
116                 </h:outputFormat>
117         </ui:define>
118 </ui:composition>