]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 29 Aug 2016 14:38:32 +0000 (16:38 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 29 Aug 2016 17:34:07 +0000 (19:34 +0200)
- got rid of login_edit_user_data.xhtml, it was redundant anyway
- better is to have each "user_change" menu entry in left menu
- rewired navigation rules
- renamed feature from edit_user_data to change_user_personal_data as this reflects more its purpose
- added missing i18n strings

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java
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/login/user/user_menu.tpl
web/user/login_change_password.xhtml
web/user/login_change_personal_data.xhtml
web/user/login_contact_data_saved.xhtml
web/user/login_edit_user_data.xhtml [deleted file]

index 87295f817fc66d8c5cff928d6dc6f79012586cc6..9b7ab6d14ec5218ce2d3a959247de5bcad0c73e2 100644 (file)
@@ -538,7 +538,7 @@ public class JobsUserWebSessionBean extends BaseJobsController implements JobsUs
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
                        throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
-               } else if (!this.featureController.isFeatureEnabled("edit_user_data")) {
+               } else if (!this.featureController.isFeatureEnabled("change_user_personal_data")) {
                        // Editing is not allowed
                        throw new IllegalStateException("User tried to edit personal data."); //NOI18N
                }
index 04b1b1180f14fbdeeb37325eb5106720bbf3bd09..79df05bd13f686594e000b1e9899e0d80bc94d7c 100644 (file)
@@ -788,3 +788,6 @@ LOGIN_CHANGE_PASSWORD_LEGEND_TITLE=Das neue Passwort muss zweimal eingegeben wer
 ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED=Das \u00c4ndern der Email-Adresse ist administrativ deaktiviert worden.
 ERROR_USER_CHANGE_EMAIL_ADDRESS_ALREADY_QUEUED=Die von Ihnen eingegebene Email-Adresse hatten Sie bereits zum \u00c4ndern eingegeben. Bitte melden Sie sich beim Support.
 ERROR_USER_EMAIL_ADDRESSES_MISMATCH=Die von Ihnen eingegebenen Email-Adressen stimmen nicht \u00fcberein.
+MENU_USER_EDIT_PROFILE_TITLE=Edit profile data
+USER_ENTER_NEW_PASSWORD=New password:
+USER_ENTER_NEW_PASSWORD_REPEAT=Repeat:
index 96f66c4ed2842e4ce5d6cbdb6732a3e51410b76e..5a41087c0e9f2aa1908a2b32c1b9815c65ba0c4c 100644 (file)
@@ -789,3 +789,6 @@ LOGIN_CHANGE_PASSWORD_LEGEND_TITLE=The new password must be entered twice to avo
 ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED=Changing of user's email address is administratively deactivated.
 ERROR_USER_CHANGE_EMAIL_ADDRESS_ALREADY_QUEUED=You have already entered the email address for changing. Please report to support.
 ERROR_USER_EMAIL_ADDRESSES_MISMATCH=Your both entered email addresses are mismatching.
+MENU_USER_EDIT_PROFILE_TITLE=Profildaten editieren
+USER_ENTER_NEW_PASSWORD=Neues Passwort:
+USER_ENTER_NEW_PASSWORD_REPEAT=Wiederholen:
index 825dfcc41f1a97c2c378d3fb433e4826ff4a3d35..ee336973e6d805980e6b9977c752d608ac63e4de 100644 (file)
                        <to-view-id>/guest/user/resend_link.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
-                       <from-outcome>login_edit_user_data</from-outcome>
-                       <to-view-id>/login/login_edit_user_data.xhtml</to-view-id>
+                       <from-outcome>user_change_email_address</from-outcome>
+                       <to-view-id>/user/login_change_email_address.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>user_change_password</from-outcome>
+                       <to-view-id>/user/login_change_password.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>user_change_personal_data</from-outcome>
+                       <to-view-id>/user/login_change_personal_data.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>user_profile</from-outcome>
                        <to-view-id>/user/login_add_addressbook.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
-       <navigation-rule>
-               <from-view-id>/user/login_edit_user_data.xhtml</from-view-id>
-               <navigation-case>
-                       <from-outcome>user_change_email_address</from-outcome>
-                       <to-view-id>/user/login_change_email_address.xhtml</to-view-id>
-               </navigation-case>
-               <navigation-case>
-                       <from-outcome>user_change_password</from-outcome>
-                       <to-view-id>/user/login_change_password.xhtml</to-view-id>
-               </navigation-case>
-               <navigation-case>
-                       <from-outcome>user_change_personal_data</from-outcome>
-                       <to-view-id>/user/login_change_personal_data.xhtml</to-view-id>
-               </navigation-case>
-       </navigation-rule>
        <navigation-rule>
                <from-view-id>/user/login_change_password.xhtml</from-view-id>
                <navigation-case>
index cf4958f46a81588c231df1b77ebcf0775844d2db..0d478bcb9074a4ffa91706a2cc7a2ea6ec49e76e 100644 (file)
                                </ui:fragment>
                        </ul>
 
-                       <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') or featureController.isFeatureEnabled('change_user_password') or featureController.isFeatureEnabled('user_change_email_address')}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('change_user_personal_data') or featureController.isFeatureEnabled('change_user_password') or featureController.isFeatureEnabled('user_change_email_address')}">
                                <div class="menu_header">
-                                       <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
+                                       <h:outputText value="#{msg.MENU_USER_EDIT_PROFILE_TITLE}" />
                                </div>
 
                                <ul>
-                                       <li>
-                                               <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="user_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
-                                       </li>
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('change_user_personal_data')}">
+                                               <li>
+                                                       <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
+                                               </li>
+                                       </ui:fragment>
+
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_change_email_address')}">
+                                               <li>
+                                                       <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
+                                               </li>
+                                       </ui:fragment>
+
+                                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword() or featureController.isFeatureEnabled('change_user_password')}">
+                                               <li>
+                                                       <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="user_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
+                                               </li>
+                                       </ui:fragment>
                                </ul>
                        </ui:fragment>
 
index cb4b87ac276f72693c6a417079c486702f1c5d8b..6bbde0a3738b5463463444743742396f6b1f7d95 100644 (file)
@@ -38,7 +38,7 @@
 
                                                                <div class="table_row">
                                                                        <div class="table_left">
-                                                                               <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_PASSWORD}" />
+                                                                               <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" />
                                                                        </div>
 
                                                                        <div class="table_right">
@@ -54,7 +54,7 @@
 
                                                                <div class="table_row">
                                                                        <div class="table_left">
-                                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_PASSWORD_REPEAT}" />
+                                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" />
                                                                        </div>
 
                                                                        <div class="table_right">
index 17760ecb9f9af210fa1fae0f190b30b550256921..f8ec40bb9cbc5f31431dce3a4dedde99a805c2d4 100644 (file)
@@ -17,7 +17,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:panelGroup styleClass="table_medium" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
+                       <h:panelGroup styleClass="table_medium" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
                                <div class="table_header">
                                        <h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
                                </div>
@@ -36,7 +36,7 @@
                                </h:form>
                        </h:panelGroup>
 
-                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('edit_user_data')}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" />
                                        <ui:param name="styleClass" value="errors" />
index 75d6b04d20cc179d099e19474978acb90bd1264a..1eceebdea280c3281488c29e478a5cfaaba7fba5 100644 (file)
@@ -17,7 +17,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
                                </ui:include>
@@ -27,7 +27,7 @@
                                <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('edit_user_data')}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" />
                                        <ui:param name="styleClass" value="errors" />
diff --git a/web/user/login_edit_user_data.xhtml b/web/user/login_edit_user_data.xhtml
deleted file mode 100644 (file)
index b634e6e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
-               <ui:define name="login_title">
-                       <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_EDIT_USER_DATA}" />
-               </ui:define>
-
-               <ui:define name="content_header">
-                       <h:outputText value="#{msg.CONTENT_TITLE_USER_LOGIN_EDIT_USER_DATA}" />
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:panelGroup styleClass="table" layout="block" rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
-                               <div class="table_header">
-                                       <h:outputText value="#{msg.LOGIN_EDIT_USER_DATA_TITLE}" />
-                               </div>
-
-                               <div class="para notice">
-                                       <h:outputText value="#{msg.LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE}" />
-                               </div>
-
-                               <div class="para">
-                                       <ul>
-                                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
-                                                       </li>
-                                               </ui:fragment>
-
-                                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_email_address'))}">
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
-                                                       </li>
-                                               </ui:fragment>
-
-                                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
-                                                       </li>
-                                               </ui:fragment>
-                                       </ul>
-                               </div>
-                       </h:panelGroup>
-
-                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
-                               <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
-                       </ui:fragment>
-               </ui:define>
-       </ui:composition>
-</html>