]> git.mxchange.org Git - addressbook-war.git/blob - web/admin/user/admin_user_unlock.xhtml
Updated copyright year
[addressbook-war.git] / web / admin / user / admin_user_unlock.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition
3         template="/WEB-INF/templates/admin/admin_base.tpl"
4         xmlns="http://www.w3.org/1999/xhtml"
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
11         <ui:define name="metadata">
12                 <f:metadata>
13                         <f:viewParam
14                                 name="userId"
15                                 value="#{beanHelper.user}"
16                                 converter="UserConverter"
17                                 required="true"
18                                 requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
19                                 converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
20                                 />
21                         <f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
22                 </f:metadata>
23         </ui:define>
24
25         <ui:define name="document_admin_title">
26                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}" />
27         </ui:define>
28
29         <ui:define name="content_header">
30                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}" />
31         </ui:define>
32
33         <ui:define name="content">
34                 <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
35                         <h:panelGroup layout="block">
36                                 <div class="table-header">
37                                         <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
38                                                 <f:param value="#{beanHelper.user.userName}" />
39                                                 <f:param value="#{beanHelper.user.userId}" />
40                                         </h:outputFormat>
41                                 </div>
42
43                                 <h:panelGroup styleClass="para" layout="block">
44                                         <div class="table-data-label">
45                                                 <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" />
46                                         </div>
47
48                                         <div class="table-data-field">
49                                                 <p:link
50                                                         outcome="admin_show_user"
51                                                         title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}"
52                                                         value="#{beanHelper.user.userId}"
53                                                         >
54                                                         <f:param name="userId" value="#{beanHelper.user.userId}" />
55                                                 </p:link>
56                                         </div>
57                                 </h:panelGroup>
58
59                                 <h:panelGroup styleClass="para" layout="block">
60                                         <div class="table-data-label">
61                                                 <p:outputLabel for="contactPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
62                                         </div>
63
64                                         <div class="table-data-field">
65                                                 <h:outputText id="contactPersonalTitle" value="#{msg[beanHelper.user.userContact.contactPersonalTitle.messageKey]}" />
66                                         </div>
67                                 </h:panelGroup>
68
69                                 <h:panelGroup styleClass="para" layout="block">
70                                         <div class="table-data-label">
71                                                 <p:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
72                                         </div>
73
74                                         <div class="table-data-field">
75                                                 <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
76                                         </div>
77                                 </h:panelGroup>
78
79                                 <h:panelGroup styleClass="para" layout="block">
80                                         <div class="table-data-label">
81                                                 <p:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
82                                         </div>
83
84                                         <div class="table-data-field">
85                                                 <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
86                                         </div>
87                                 </h:panelGroup>
88
89                                 <h:panelGroup styleClass="para" layout="block">
90                                         <div class="table-data-label">
91                                                 <p:outputLabel for="userLastLocked" value="#{msg.DATA_USER_LAST_LOCKED}" />
92                                         </div>
93
94                                         <div class="table-data-field">
95                                                 <h:outputText id="userLastLocked" value="#{beanHelper.user.userLastLocked}">
96                                                         <f:convertDateTime type="both" />
97                                                 </h:outputText>
98                                         </div>
99                                 </h:panelGroup>
100
101                                 <h:panelGroup styleClass="para" layout="block">
102                                         <div class="table-data-label">
103                                                 <p:outputLabel for="userLockReason" value="#{msg.DATA_USER_LAST_LOCKED_REASON}" />
104                                         </div>
105
106                                         <div class="table-data-field">
107                                                 <h:outputText id="userLockReason" value="#{beanHelper.user.userLastLockedReason}" />
108                                         </div>
109                                 </h:panelGroup>
110
111                                 <p:panelGrid columns="2" layout="grid">
112                                         <p:commandButton
113                                                 type="reset"
114                                                 value="#{msg.BUTTON_RESET_FORM}"
115                                                 />
116
117                                         <p:commandButton
118                                                 type="submit"
119                                                 action="#{adminUserController.unlockUserAccount()}"
120                                                 value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}"
121                                                 />
122                                 </p:panelGrid>
123                         </h:panelGroup>
124                 </h:form>
125
126                 <h:outputFormat
127                         styleClass="alert-danger"
128                         value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNCONFIRMED}"
129                         rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"
130                         >
131                         <f:param value="#{beanHelper.user.userName}" />
132                         <f:param value="#{beanHelper.user.userId}" />
133                 </h:outputFormat>
134
135                 <h:outputFormat
136                         styleClass="alert-danger"
137                         value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED}"
138                         rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}"
139                         >
140                         <f:param value="#{beanHelper.user.userName}" />
141                         <f:param value="#{beanHelper.user.userId}" />
142                 </h:outputFormat>
143         </ui:define>
144 </ui:composition>