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