]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/user/admin_user_lock.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / user / admin_user_lock.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: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:f="http://xmlns.jcp.org/jsf/core"
9         xmlns:p="http://primefaces.org/ui"
10         >
11
12         <ui:define name="metadata">
13                 <f:metadata>
14                         <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}" />
15                         <f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
16                 </f:metadata>
17         </ui:define>
18
19         <ui:define name="document_admin_title">
20                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LOCK_USER}" />
21         </ui:define>
22
23         <ui:define name="content_header">
24                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LOCK_USER}" />
25         </ui:define>
26
27         <ui:define name="content">
28                 <core:outputMessageBox panelGroupId="errorHandlerLockUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
29
30                 <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
31                         <h:panelGroup layout="block">
32                                 <div class="table-header">
33                                         <h:outputFormat value="#{msg.ADMIN_LOCK_USER_TITLE}">
34                                                 <f:param value="#{beanHelper.user.userName}" />
35                                                 <f:param value="#{beanHelper.user.userId}" />
36                                         </h:outputFormat>
37                                 </div>
38
39                                 <h:panelGroup styleClass="table-row" layout="block">
40                                         <div class="table-left-medium">
41                                                 <p:outputLabel for="contactPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
42                                         </div>
43
44                                         <div class="table-right-medium">
45                                                 <h:outputFormat id="contactPersonalTitle" value="#{msg[beanHelper.user.userContact.contactPersonalTitle.messageKey]}" />
46                                         </div>
47                                 </h:panelGroup>
48
49                                 <h:panelGroup styleClass="table-row" layout="block">
50                                         <div class="table-left-medium">
51                                                 <p:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
52                                         </div>
53
54                                         <div class="table-right-medium">
55                                                 <h:outputFormat id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
56                                         </div>
57                                 </h:panelGroup>
58
59                                 <h:panelGroup styleClass="table-row" layout="block">
60                                         <div class="table-left-medium">
61                                                 <p:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
62                                         </div>
63
64                                         <div class="table-right-medium">
65                                                 <h:outputFormat id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
66                                         </div>
67                                 </h:panelGroup>
68
69                                 <h:panelGroup styleClass="table-row" layout="block">
70                                         <div class="table-left-medium">
71                                                 <p:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" />
72                                         </div>
73
74                                         <div class="table-right-medium">
75                                                 <p:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" />
76                                         </div>
77                                 </h:panelGroup>
78
79                                 <p:panelGrid columns="2" layout="grid">
80                                         <p:commandButton
81                                                 type="reset"
82                                                 value="#{msg.BUTTON_RESET_FORM}"
83                                                 />
84
85                                         <p:commandButton
86                                                 type="submit"
87                                                 action="#{adminUserController.lockUserAccount()}"
88                                                 value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}"
89                                                 />
90                                 </p:panelGrid>
91                         </h:panelGroup>
92                 </h:form>
93
94                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
95                         <f:param value="#{beanHelper.user.userName}" />
96                         <f:param value="#{beanHelper.user.userId}" />
97                 </h:outputFormat>
98
99                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
100                         <f:param value="#{beanHelper.user.userName}" />
101                         <f:param value="#{beanHelper.user.userId}" />
102                 </h:outputFormat>
103         </ui:define>
104 </ui:composition>