]> 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 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                                 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_LOCK_USER}" />
19         </ui:define>
20
21         <ui:define name="content_header">
22                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LOCK_USER}" />
23         </ui:define>
24
25         <ui:define name="content">
26                 <widgets: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-lock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
29                         <h:panelGroup styleClass="table table-full" layout="block">
30                                 <div class="table-header">
31                                         <h:outputFormat value="#{msg.ADMIN_LOCK_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="table-row" layout="block">
38                                         <div class="table-left-medium">
39                                                 <p:outputLabel for="contactPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
40                                         </div>
41
42                                         <div class="table-right-medium">
43                                                 <h:outputFormat id="contactPersonalTitle" value="#{msg[beanHelper.user.userContact.contactPersonalTitle.messageKey]}" />
44                                         </div>
45                                 </h:panelGroup>
46
47                                 <h:panelGroup styleClass="table-row" layout="block">
48                                         <div class="table-left-medium">
49                                                 <p:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
50                                         </div>
51
52                                         <div class="table-right-medium">
53                                                 <h:outputFormat id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
54                                         </div>
55                                 </h:panelGroup>
56
57                                 <h:panelGroup styleClass="table-row" layout="block">
58                                         <div class="table-left-medium">
59                                                 <p:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
60                                         </div>
61
62                                         <div class="table-right-medium">
63                                                 <h:outputFormat id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
64                                         </div>
65                                 </h:panelGroup>
66
67                                 <h:panelGroup styleClass="table-row" layout="block">
68                                         <div class="table-left-medium">
69                                                 <p:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" />
70                                         </div>
71
72                                         <div class="table-right-medium">
73                                                 <p:inputTextarea styleClass="input" id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" />
74                                         </div>
75                                 </h:panelGroup>
76
77                                 <div class="table-footer">
78                                         <p:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
79
80                                         <p:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount()}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" />
81                                 </div>
82                         </h:panelGroup>
83                 </h:form>
84
85                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
86                         <f:param value="#{beanHelper.user.userName}" />
87                         <f:param value="#{beanHelper.user.userId}" />
88                 </h:outputFormat>
89
90                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
91                         <f:param value="#{beanHelper.user.userName}" />
92                         <f:param value="#{beanHelper.user.userId}" />
93                 </h:outputFormat>
94         </ui:define>
95 </ui:composition>