]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/user/admin_user_unlock.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / user / admin_user_unlock.xhtml
index 06f86a245d5f6ae911c0de136f9405d0e329527b..6963266e3e505c83606947e6941b20d69163389e 100644 (file)
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
-       <f:metadata>
-               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{beanHelper.copyUserToController()}" />
-       </f:metadata>
+       <ui:define name="metadata">
+               <f:metadata>
+                       <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+                       <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" />
+               </f:metadata>
+       </ui:define>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>
+               <ui:define name="admin_title">
+                       <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}" />
+               </ui:define>
 
                <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}
+                       <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}" />
                </ui:define>
 
                <ui:define name="content">
                        <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />
 
-                       <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user}">
-                               <div class="table">
+                       <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
+                               <h:panelGroup styleClass="table_medium" layout="block">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
-                                                       <f:param value="#{beanHelper.user.userId}" />
                                                        <f:param value="#{beanHelper.user.userName}" />
+                                                       <f:param value="#{beanHelper.user.userId}" />
                                                </h:outputFormat>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputText value="#{msg.ADMIN_EXPORT_USER_ID}" />
+                                               </div>
+
+                                               <div class="table_data_field">
+                                                       <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}">
+                                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                                       </h:link>
+                                               </div>
+                                       </div>
+
+                                       <div class="para">
+                                               <div class="table_data_label">
                                                        <h:outputLabel for="contactGender" value="#{msg.PERSONAL_DATA_GENDER}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div class="table_data_field">
                                                        <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
                                                </div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div class="table_data_label">
                                                        <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div class="table_data_field">
                                                        <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
                                                </div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div class="table_data_label">
                                                        <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div class="table_data_field">
                                                        <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
                                                </div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
-                                                       <h:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" />
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputLabel for="userLockReason" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />
                                                </div>
 
-                                               <div class="table_right75">
-                                                       <h:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="30" rows="20" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" />
-
-                                                       <h:outputText value="#{adminUserController.userLockReason}" />
-
-                                                       <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.UNCONFIRMED}" />
+                                               <div class="table_data_field">
+                                                       <h:outputText id="userLockReason" value="#{adminUserController.userLockReason}" />
                                                </div>
                                        </div>
 
                                        <div class="table_footer">
-                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-
-                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount()}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.CONFIRMED}" />
+                                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
 
-                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount()}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.LOCKED}" />
-
-                                               <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.UNCONFIRMED}" />
+                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" />
                                        </div>
-                               </div>
+                               </h:panelGroup>
                        </h:form>
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
+                               <f:param value="#{beanHelper.user.userName}" />
+                               <f:param value="#{beanHelper.user.userId}" />
+                       </h:outputFormat>
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+                               <f:param value="#{beanHelper.user.userName}" />
+                               <f:param value="#{beanHelper.user.userId}" />
+                       </h:outputFormat>
                </ui:define>
        </ui:composition>
 </html>