From: Roland Haeder Date: Fri, 4 Mar 2016 19:48:36 +0000 (+0100) Subject: Splitted edit_user_data into 3 new sub actions + added logged-in check: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=04cd2b59d17db6a3837a70c165c911eb563f4a66;p=jjobs-war.git Splitted edit_user_data into 3 new sub actions + added logged-in check: - new template user_not_logged_in.tpl added which shows a message if the user is not logged-in and tries to access a login-only page - added login_change_email_address.xhtml for changing email address - added login_change_password.xhtml for changing password - added login_change_personal_data.xhtml for changing personal data - login_edit_address.xhtml is now no longer needed --- diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 50a0e4bd..14f40311 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,29 +2,33 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java index b569fbae..f81c1f8a 100644 --- a/src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java @@ -173,13 +173,13 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController { @Override public boolean isUserLoggedIn () { // Trace message - // NOISY: System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType())); + // NOISY-DEBUG System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType())); // Compare instance this.userLoggedIn = ((this.getLoggedInUser() instanceof User) && (Objects.equals(this.getLoggedInUser().getUserAccountStatus(), UserAccountStatus.CONFIRMED))); // Trace message - // NOISY: System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn)); + // NOISY-DEBUG System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn)); // Return it return this.userLoggedIn; diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 228d1aae..6f92a5d9 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -139,13 +139,9 @@ PAGE_TITLE_USER_LIST=Benutzerliste CONTENT_TITLE_USER_LIST=Alle angemeldeten Benutzer: PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern mir freigegeben Adressb\u00fccher CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern freigegebene Adressb\u00fccher auflisten: -LINK_LOGIN_EDIT_ADDRESS=Kontaktdaten \u00e4ndern -LINK_LOGIN_EDIT_ADDRESS_TITLE=\u00c4ndern Sie hier Ihre eigenen Kontaktdaten. LINK_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern LINK_LOGIN_EDIT_USER_DATA_TITLE=\u00c4ndern Sie hier Ihre eigenen Benutzerdaten. MENU_EDIT_PROFILE_TITLE=Daten \u00e4ndern -PAGE_TITLE_LOGIN_EDIT_ADDRESS=Meine Kontaktdaten \u00e4ndern -CONTENT_TITLE_LOGIN_EDIT_ADDRESS=\u00c4ndern Sie Ihre Adressdaten: PAGE_TITLE_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern CONTENT_TITLE_LOGIN_EDIT_USER_DATA=\u00c4ndern Sie Ihre Benutzerdaten: PRIVACY_STATEMENTS=Datenschutzbestimmungen @@ -219,8 +215,7 @@ ADDRESSBOOK_STATUS=Status: PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK=\u00d6ffentlicher Teil des Adressbuchs anzeigen USER_PROFILE_NOT_PUBLICLY_VISIBLE=Das Benutzerprofil ist privat. PAGE_TITLE_LOGIN_USER_PROFILE=Benutzerprofil ansehen -#TODO: Fix German umlaut! -PUBLIC_USER_PROFILE=Oeffentliches Benutzerprofil +PUBLIC_USER_PROFILE=\u00d6ffentliches Benutzerprofil USER_PROFILE_MODE_INVISIBLE=Nicht sichtbar USER_PROFILE_MODE_MEMBERS=Nur von Mitgliedern einsehbar #TODO: Please fix German umlaut! @@ -238,3 +233,17 @@ ERROR_USER_INSTANCE_NOT_SET=Fehler: Benutzer-Instanz nicht gesetzt. LOGIN_ADDRESSBOOK_NOT_SET=Adressbuch-Instanz nicht gesetzt. LINK_GUEST_LOGIN_LOST_PASSWORD=Passwort vergessen? LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Passwort wiederherstellen +#TODO: Please fix German umlaut! +TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=Sie muessen angemeldet sein +#TODO: Please fix German umlaut! +USER_IS_NOT_LOGGED_IN_FULL=Damit diese Funktion nutzen koennen, muessen Sie sich anmelden und in Ihren Account eingeloggt sein. +#TODO: Please fix German umlaut! +LOGIN_EDIT_USER_DATA_TITLE=Was moechten Sie aendern? +#TODO: Please fix German umlaut! +LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=Sie koennen hier Ihre persoenlichen Daten, Ihre Email-Adresse und Ihr Passwort zum Einloggen aendern. +#TODO: Please fix German umlaut! +LINK_LOGIN_CHANGE_PERSONAL_DATA=Persoenliche Daten, wie Anschrift usw. aendern +#TODO: Please fix German umlaut! +LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Ihre Email-Adresse aendern +#TODO: Please fix German umlaut! +LINK_LOGIN_CHANGE_PASSWORD=Ihr Passwort aendern diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index b6599648..65f59c0b 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -138,13 +138,9 @@ PAGE_TITLE_USER_LIST=User list CONTENT_TITLE_USER_LIST=All registered users: PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Other user's addressbooks shared with me CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Manage other's shared address books -LINK_LOGIN_EDIT_ADDRESS=Personal data -LINK_LOGIN_EDIT_ADDRESS_TITLE=Change your own address data here. LINK_LOGIN_EDIT_USER_DATA=Profile data LINK_LOGIN_EDIT_USER_DATA_TITLE=Change your own user account data here. MENU_EDIT_PROFILE_TITLE=Edit data -PAGE_TITLE_LOGIN_EDIT_ADDRESS=Change my address data -CONTENT_TITLE_LOGIN_EDIT_ADDRESS=Change your address data: PAGE_TITLE_LOGIN_EDIT_USER_DATA=Change user data CONTENT_TITLE_LOGIN_EDIT_USER_DATA=Change your user data: PRIVACY_STATEMENTS=privacy statements @@ -232,3 +228,10 @@ ERROR_USER_INSTANCE_NOT_SET=Error: User instance not set. LOGIN_ADDRESSBOOK_NOT_SET=Address book instance not set. LINK_GUEST_LOGIN_LOST_PASSWORD=Lost your password? LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password +TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=You need to be logged-in +USER_IS_NOT_LOGGED_IN_FULL=To use this feature you need to register and be logged-in into your account. +LOGIN_EDIT_USER_DATA_TITLE=What do you want to change? +LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=You can change your personal data, your email address and your password for login here. +LINK_LOGIN_CHANGE_PERSONAL_DATA=Change personal data such as your address. +LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address +LINK_LOGIN_CHANGE_PASSWORD=Change your password diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 5125f2cd..83579c01 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -95,10 +95,6 @@ admin_logout /admin/admin_logout.xhtml - - login_edit_address - /login/login_edit_address.xhtml - login_edit_user_data /login/login_edit_user_data.xhtml @@ -144,4 +140,19 @@ /user/show_addressbook_entries.xhtml + + /login/login_edit_user_data.xhtml + + login_change_email_address + /login/login_change_email_address.xhtml + + + login_change_password + /login/login_change_password.xhtml + + + login_change_personal_data + /login/login_change_personal_data.xhtml + + diff --git a/web/WEB-INF/glassfish-web.xml b/web/WEB-INF/glassfish-web.xml index b70617b4..15d7a0a5 100644 --- a/web/WEB-INF/glassfish-web.xml +++ b/web/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /addressbook-war + /jjobs-war diff --git a/web/WEB-INF/templates.dist/login_page.xhtml b/web/WEB-INF/templates.dist/login_page.xhtml index b93f606e..b021f0a5 100644 --- a/web/WEB-INF/templates.dist/login_page.xhtml +++ b/web/WEB-INF/templates.dist/login_page.xhtml @@ -14,7 +14,13 @@ - Here goes your content. + + Here goes your content. + + + + diff --git a/web/WEB-INF/templates/generic/user_not_logged_in.tpl b/web/WEB-INF/templates/generic/user_not_logged_in.tpl new file mode 100644 index 00000000..300eb240 --- /dev/null +++ b/web/WEB-INF/templates/generic/user_not_logged_in.tpl @@ -0,0 +1,17 @@ + + + +
+
+ #{msg.TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN} +
+ +
+ +
+
+
diff --git a/web/WEB-INF/templates/login/login_base.tpl b/web/WEB-INF/templates/login/login_base.tpl index abd205b7..d3e0f5fc 100644 --- a/web/WEB-INF/templates/login/login_base.tpl +++ b/web/WEB-INF/templates/login/login_base.tpl @@ -1,14 +1,19 @@ + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html"> #{msg.PAGE_TITLE_LOGIN_AREA} - - diff --git a/web/WEB-INF/templates/login/login_menu.tpl b/web/WEB-INF/templates/login/login_menu.tpl index 8421aee9..436c5566 100644 --- a/web/WEB-INF/templates/login/login_menu.tpl +++ b/web/WEB-INF/templates/login/login_menu.tpl @@ -28,9 +28,6 @@
  • -
  • - -