]> git.mxchange.org Git - addressbook-war.git/blob - web/admin/user/admin_user_lock.xhtml
Updated copyright year
[addressbook-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: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_LOCK_USER}" />
27         </ui:define>
28
29         <ui:define name="content_header">
30                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LOCK_USER}" />
31         </ui:define>
32
33         <ui:define name="content">
34                 <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
35                         <h:panelGroup layout="block">
36                                 <div class="table-header">
37                                         <h:outputFormat value="#{msg.ADMIN_LOCK_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="table-row" layout="block">
44                                         <div class="table-left-medium">
45                                                 <p:outputLabel for="contactPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
46                                         </div>
47
48                                         <div class="table-right-medium">
49                                                 <h:outputFormat id="contactPersonalTitle" value="#{msg[beanHelper.user.userContact.contactPersonalTitle.messageKey]}" />
50                                         </div>
51                                 </h:panelGroup>
52
53                                 <h:panelGroup styleClass="table-row" layout="block">
54                                         <div class="table-left-medium">
55                                                 <p:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
56                                         </div>
57
58                                         <div class="table-right-medium">
59                                                 <h:outputFormat id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
60                                         </div>
61                                 </h:panelGroup>
62
63                                 <h:panelGroup styleClass="table-row" layout="block">
64                                         <div class="table-left-medium">
65                                                 <p:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
66                                         </div>
67
68                                         <div class="table-right-medium">
69                                                 <h:outputFormat id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
70                                         </div>
71                                 </h:panelGroup>
72
73                                 <h:panelGroup styleClass="table-row" layout="block">
74                                         <div class="table-left-medium">
75                                                 <p:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" />
76                                         </div>
77
78                                         <div class="table-right-medium">
79                                                 <p:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" />
80                                         </div>
81                                 </h:panelGroup>
82
83                                 <p:panelGrid columns="2" layout="grid">
84                                         <p:commandButton
85                                                 type="reset"
86                                                 value="#{msg.BUTTON_RESET_FORM}"
87                                                 />
88
89                                         <p:commandButton
90                                                 type="submit"
91                                                 action="#{adminUserController.lockUserAccount()}"
92                                                 value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}"
93                                                 >
94                                                 <f:param name="userId" value="${beanHelper.user.userId}" />
95                                         </p:commandButton>
96                                 </p:panelGrid>
97                         </h:panelGroup>
98                 </h:form>
99
100                 <h:outputFormat
101                         styleClass="alert-danger"
102                         value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_UNCONFIRMED}"
103                         rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"
104                         >
105                         <f:param value="#{beanHelper.user.userName}" />
106                         <f:param value="#{beanHelper.user.userId}" />
107                 </h:outputFormat>
108
109                 <h:outputFormat
110                         styleClass="alert-danger"
111                         value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED}"
112                         rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}"
113                         >
114                         <f:param value="#{beanHelper.user.userName}" />
115                         <f:param value="#{beanHelper.user.userId}" />
116                 </h:outputFormat>
117         </ui:define>
118 </ui:composition>