From c75781b617f2e4344b3e82a3bf1b06fba80e0494 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Mar 2016 20:48:40 +0100 Subject: [PATCH] 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 --- nbproject/faces-config.NavData | 55 ++++++------ .../localization/bundle_de_DE.properties | 21 +++-- .../localization/bundle_en_US.properties | 11 ++- web/WEB-INF/faces-config.xml | 19 ++++- web/WEB-INF/templates.dist/login_page.xhtml | 8 +- .../templates/generic/user_not_logged_in.tpl | 17 ++++ web/WEB-INF/templates/login/login_base.tpl | 11 ++- web/WEB-INF/templates/login/login_menu.tpl | 3 - web/login/login_add_addressbook.xhtml | 42 +++++---- web/login/login_change_email_address.xhtml | 85 +++++++++++++++++++ web/login/login_change_password.xhtml | 84 ++++++++++++++++++ web/login/login_change_personal_data.xhtml | 59 +++++++++++++ web/login/login_edit_address.xhtml | 20 ----- web/login/login_edit_user_data.xhtml | 30 ++++++- web/login/login_index.xhtml | 8 +- .../login_list_sharing_addressbooks.xhtml | 14 ++- web/login/login_other_addressbooks.xhtml | 8 +- web/login/login_own_addressbooks.xhtml | 80 +++++++++-------- web/login/login_shared_addressbooks.xhtml | 78 +++++++++-------- .../login_start_sharing_addressbook.xhtml | 72 +++++++++------- 20 files changed, 528 insertions(+), 197 deletions(-) create mode 100644 web/WEB-INF/templates/generic/user_not_logged_in.tpl create mode 100644 web/login/login_change_email_address.xhtml create mode 100644 web/login/login_change_password.xhtml create mode 100644 web/login/login_change_personal_data.xhtml delete mode 100644 web/login/login_edit_address.xhtml diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 18dc9cdd..077c7ff6 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -16,31 +16,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index eff00ba6..afcc3ae3 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -140,13 +140,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 @@ -248,8 +244,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! @@ -267,3 +262,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 914d933c..cd945314 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -140,13 +140,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 @@ -262,3 +258,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=Forgot 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 969fbf47..9bb8d1f8 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -99,10 +99,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 @@ -173,4 +169,19 @@ /user/show_addressbook.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/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 c655637a..f224a8e5 100644 --- a/web/WEB-INF/templates/login/login_menu.tpl +++ b/web/WEB-INF/templates/login/login_menu.tpl @@ -28,9 +28,6 @@
  • -
  • - -