]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued a bit: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Sat, 6 Aug 2016 07:55:12 +0000 (09:55 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 20:06:14 +0000 (22:06 +0200)
- don't wrap command buttons in rendered="" conditions and not with ui:fragment (please name me a full replacement for all the other cases where I'm using it)
- this makes it impossible for the button's action (controller method) being executed as this depends on the life-cycle of the JSF
- it may work in viewing the JSF page but not when you submit it.
- rewrote parameter 'user' to beanHelper.user as this was already being used
- show proper lock/unlock link depending on user's account status
- added navigation rule for new user lock JSF page

Signed-off-by: Roland Häder <roland@mxchange.org>
nbproject/faces-config.NavData
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/admin/user/admin_user_links.tpl
web/admin/user/admin_user_lock.xhtml
web/admin/user/admin_user_show.xhtml
web/admin/user/admin_user_unlock.xhtml

index cfb0d6c41a68eeeadea32fc1b252bc4dd7935761..9e40d50b2f53992ccc737bdc05664152a50e01aa 100644 (file)
@@ -2,85 +2,86 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/customer/admin_customer_delete.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="user/login_logout.xhtml" x="2900" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1900" y="750" zoom="true"/>
-        <Node id="customer/checkout2.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="privacy.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="400" y="1650" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="650" y="1350" zoom="true"/>
-        <Node id="admin/index.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="customer/register.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="item_added.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/category/admin_category_list.xhtml" x="150" y="1650" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="customer/lost_passwd.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="index.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="customer/checkout_done.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="*" x="150" y="900" zoom="true"/>
-        <Node id="customer/login.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_unlock.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="admin/product/admin_product_edit.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="2400" y="450" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="user/login.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="admin/customer/admin_customer_edit.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_export.xhtml" x="1400" y="1050" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="guest/user/resend_done.xhtml" x="1150" y="1200" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="customer/checkout.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="admin/contact/admin_contact_export.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="admin/product/admin_product_delete.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="2150" y="600" zoom="true"/>
-        <Node id="basket.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="exception.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/category/admin_category_delete.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="1650" y="900" zoom="true"/>
-        <Node id="terms.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="900" y="1350" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="admin/category/admin_category_edit.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="logout.xhtml" x="400" y="1500" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="150" y="1800" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="2650" y="300" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="650" y="1500" zoom="true"/>
-        <Node id="imprint.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="900" y="1200" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="1150" y="1050" zoom="true"/>
-        <Node id="admin/customer/admin_customer_list.xhtml" x="3150" y="150" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="admin/product/admin_product_list.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_show.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="customer/empty_basket.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/customer/admin_customer_delete.xhtml" x="650" y="1500" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="user/login_logout.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="customer/checkout2.xhtml" x="1900" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="privacy.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="1400" y="1050" zoom="true"/>
+        <Node id="customer/register.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="3150" y="150" zoom="true"/>
+        <Node id="admin/category/admin_category_list.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="item_added.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="400" y="1650" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="400" y="1500" zoom="true"/>
+        <Node id="customer/lost_passwd.xhtml" x="1150" y="1200" zoom="true"/>
+        <Node id="index.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="2900" y="150" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="customer/checkout_done.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="customer/login.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="*" x="2400" y="450" zoom="true"/>
+        <Node id="admin/customer/admin_customer_unlock.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="900" y="1200" zoom="true"/>
+        <Node id="admin/product/admin_product_edit.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="1650" y="900" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="650" y="1350" zoom="true"/>
+        <Node id="admin/customer/admin_customer_edit.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_export.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="guest/user/resend_done.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="1150" y="1050" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="customer/checkout.xhtml" x="900" y="1350" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="1650" y="750" zoom="true"/>
+        <Node id="admin/product/admin_product_delete.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="basket.xhtml" x="2900" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="exception.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/category/admin_category_delete.xhtml" x="150" y="1650" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="2650" y="300" zoom="true"/>
+        <Node id="terms.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_lock.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/category/admin_category_edit.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="logout.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="imprint.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="150" y="1800" zoom="true"/>
+        <Node id="admin/customer/admin_customer_list.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="2150" y="600" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/product/admin_product_list.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/customer/admin_customer_show.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="customer/empty_basket.xhtml" x="1400" y="900" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index c8667ecb125cf65b564476d7ec10efaa16562864..d752f5895bf4f70ef1739f52c488909a4b53f9b0 100644 (file)
@@ -602,3 +602,4 @@ BUTTON_ADMIN_UNLOCK_USER_ACCOUNT=Benutzeraccount entsperren
 ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED=Unbest\u00e4tigte Benutzeraccounts k\u00f6nnen nicht gesperrt werden.
 PAGE_TITLE_ADMIN_LOCK_USER=Benutzeraccount sperren
 CONTENT_TITLE_ADMIN_LOCK_USER=Benutzeraccount sperren:
+ERROR_BEAN_HELPER_USER_NOT_SET=Fehler: Instanz 'user' im Bean-Helper nicht gesetzt.
index 3a8926b34fa5615af5360e535e87a5643e7d3d13..2bbc5d37091a7f9d2d5a36f27a1a6f6b903bb334 100644 (file)
@@ -585,3 +585,4 @@ BUTTON_ADMIN_UNLOCK_USER_ACCOUNT=Unlock user account
 ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED=Unconfirmed user accounts cannot be locked.
 PAGE_TITLE_ADMIN_LOCK_USER=Lock user account
 CONTENT_TITLE_ADMIN_LOCK_USER=Lock user account:
+ERROR_BEAN_HELPER_USER_NOT_SET=Error: Instance 'user' not set in bean helper.
index 7da31520e71a3ae455086400350192a192f0b616..2bfc1191585a7b8fd2ca58ff029e1624899d465b 100644 (file)
                        <from-outcome>admin_delete_user</from-outcome>
                        <to-view-id>/admin/user/admin_user_delete.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_lock_user</from-outcome>
+                       <to-view-id>/admin/user/admin_user_lock.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_unlock_user</from-outcome>
                        <to-view-id>/admin/user/admin_user_unlock.xhtml</to-view-id>
index 0c66c5868533ad8f907ff653614120c47e61324d..ef30a7698a6d0bc6b01d4f1e8edf6ffaa909d51d 100644 (file)
@@ -5,9 +5,9 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_USER_NOT_SET}" rendered="#{empty user}" />
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_USER_NOT_SET}" rendered="#{empty beanHelper.user}" />
 
-       <ui:fragment rendered="#{not empty user}">
+       <ui:fragment rendered="#{not empty beanHelper.user}">
                <div class="table">
                        <div class="table_header">
                                <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" />
                                <ul>
                                        <li>
                                                <h:link outcome="admin_edit_user" value="#{msg.ADMIN_LINK_EDIT_USER}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}">
-                                                       <f:param name="userId" value="#{user.userId}" />
+                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
                                                </h:link>
                                        </li>
 
                                        <li>
                                                <h:link outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_CONTACT}" title="#{msg.ADMIN_LINK_EDIT_CONTACT_TITLE}">
-                                                       <f:param name="contactId" value="#{user.userContact.contactId}" />
+                                                       <f:param name="contactId" value="#{beanHelper.user.userContact.contactId}" />
                                                </h:link>
                                        </li>
 
                                        <li>
-                                               <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}">
-                                                       <f:param name="userId" value="#{user.userId}" />
+                                               <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
+                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                               </h:link>
+
+                                               <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
                                                </h:link>
                                        </li>
 
                                        <li>
                                                <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}">
                                                        <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_USER}" />
-                                                       <f:param name="userId" value="#{user.userId}" />
+                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
                                                </h:link>
                                        </li>
                                </ul>
index f08c7d82a050211f9cf9a3724f023fbc96dc2827..e074bcb755e299ab7a23f3fb2bb813c4a7f76393 100644 (file)
@@ -23,7 +23,7 @@
                <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}">
+                       <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
                                <div class="table_medium">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_LOCK_USER_TITLE}">
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
 
-                                               <ui:fragment rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
-                                                       <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" />
-                                               </ui:fragment>
-
-                                               <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
+                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" />
                                        </div>
                                </div>
                        </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
                </ui:define>
        </ui:composition>
 </html>
index 17df62775096f5425d41564178e036aca820ee94..f9c9b9cd93359cc4e77cc648e399d4b832d5cbf7 100644 (file)
                        </h:panelGrid>
 
                        <div>
-                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">
-                                       <ui:param name="user" value="#{beanHelper.user}" />
-                               </ui:include>
+                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl" />
                        </div>
 
                        <div>
index 8c9e71f0ce443a49b9f999d6395d4fe68c7414f1..fe8dc18238332d2b8b1a97f19952e2f8cedde417 100644 (file)
@@ -22,7 +22,7 @@
                <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}">
+                       <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
                                <div class="table_medium">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
 
-                                               <ui:fragment rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
-                                                       <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" />
-                                               </ui:fragment>
-
-                                               <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
+                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" />
                                        </div>
                                </div>
                        </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
                </ui:define>
        </ui:composition>
 </html>