From 0da6ce58fe970baf496034fe41bdb91208dc7537 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Apr 2016 10:38:05 +0200 Subject: [PATCH] Continued: - splitted admin user form template into user and contact - used that new admin user form template for editing user data - added controller method editUserData() - renamed relevant language keys (as they are not just for adding users) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../user/JobsAdminUserWebRequestBean.java | 5 + .../JobsAdminUserWebRequestController.java | 5 + .../localization/bundle_de_DE.properties | 23 +- .../localization/bundle_en_US.properties | 23 +- .../admin/contact/admin_form_contact_data.tpl | 182 +++++++++++++ .../admin/user/admin_form_user_data.tpl | 71 ++++++ .../user/admin_form_user_personal_data.tpl | 240 +----------------- web/admin/user/admin_user_edit.xhtml | 17 +- 8 files changed, 301 insertions(+), 265 deletions(-) create mode 100644 web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl create mode 100644 web/WEB-INF/templates/admin/user/admin_form_user_data.tpl diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 11363c2c..5e24d13e 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -196,6 +196,11 @@ public class JobsAdminUserWebRequestBean implements JobsAdminUserWebRequestContr return Collections.unmodifiableList(this.userList); } + @Override + public void editUserData () { + throw new UnsupportedOperationException("Not supported yet."); //NOI18N + } + @Override public String getUserName () { return this.userName; diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java index b7f42e40..0f19a46b 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java @@ -61,6 +61,11 @@ public interface JobsAdminUserWebRequestController extends Serializable { */ void addUser (); + /** + * Edits cuirrently loaded user's data in database. + */ + void editUserData(); + /** * Getter for user name *

diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 1485810e..650c4dc4 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -312,8 +312,8 @@ CONTENT_TITLE_ADMIN_ADD_USER=Neues Benutzeraccount hinzufuegen: TABLE_SUMMARY_ADMIN_LIST_USERS=Administration, alle Benutzer auflisten ADMIN_ADD_USER_TITLE=Neues Benutzeraccount anlegen ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Bitte geben Sie mindestens Vor- und Nachnamen, sowie Benutzernamen und Email-Adresse ein. -ADMIN_PERSONAL_DATA_LEGEND=Pers\u00f6nliche Daten des Benutzers: -ADMIN_PERSONAL_DATA_LEGEND_TITLE=Geben Sie hier die pers\u00f6nlichen Daten des neuen Benutzers ein. +ADMIN_CONTACT_PERSONAL_DATA_LEGEND=Pers\u00f6nliche Daten des Benutzers: +ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE=Geben Sie hier die pers\u00f6nlichen Daten des neuen Benutzers ein. ADMIN_PERSONAL_DATA_GENDER=Anrede ausw\u00e4hlen: ADMIN_PERSONAL_DATA_FIRST_NAME=Vorname: ADMIN_PERSONAL_DATA_FAMILY_NAME=Familienname: @@ -325,14 +325,13 @@ ADMIN_PERSONAL_DATA_COUNTRY_CODE=Land ausw\u00e4hlen: ADMIN_PERSONAL_DATA_PHONE_NUMBER=Telefonnummer: ADMIN_PERSONAL_DATA_FAX_NUMBER=Faxnummer: ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER=Handynummer: -ADMIN_ADD_USER_EMAIL_LEGEND=Benutzernamen und Email-Adresse: -ADMIN_ADD_USER_EMAIL_LEGEND_TITLE=Vergeben Sie hier den Benutzernamen und geben Sie die Email-Adresse ein. -ADMIN_ADD_USER_ENTER_USER_NAME=Benutzername (*1): -ADMIN_ADD_USER_ENTER_EMAIL=Email-Adresse (*2): -ADMIN_ADD_USER_USER_NAME_NOTICE=*1: Der Benutzername darf nur einmal vorhanden sein, das System prueft dies fuer Sie. -ADMIN_ADD_USER_PASSWORD_NOTICE=Lassen Sie beide Passwortfelder leer und es wird ein Passwort per Zufall generiert. Das Passwort wird dem Benutzer nach Erstellung des Zugangs an die Email-Adresse gesendet. -ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE=*2: Die Email-Adresse darf nur einmal vorhanden sein. -ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE=Eine Kundennummer wird automatisch beim Erstellen des Accounts erzeugt. +ADMIN_USER_DATA_EMAIL_LEGEND=Benutzernamen und Email-Adresse: +ADMIN_USER_DATA_EMAIL_LEGEND_TITLE=Vergeben Sie hier den Benutzernamen und geben Sie die Email-Adresse ein. +ADMIN_USER_DATA_ENTER_USER_NAME=Benutzername (*1): +ADMIN_USER_DATA_ENTER_EMAIL=Email-Adresse (*2): +ADMIN_USER_DATA_USER_NAME_NOTICE=*1: Der Benutzername darf nur einmal vorhanden sein, das System prueft dies fuer Sie. +ADMIN_USER_DATA_PASSWORD_NOTICE=Lassen Sie beide Passwortfelder leer und es wird ein Passwort per Zufall generiert. Das Passwort wird dem Benutzer nach Erstellung des Zugangs an die Email-Adresse gesendet. +ADMIN_USER_DATA_EMAIL_ADDRESS_NOTICE=*2: Die Email-Adresse darf nur einmal vorhanden sein. BUTTON_ADMIN_ADD_USER=Neuen Benutzer hinzuf\u00fcgen ADMIN_MENU_COUNTRY_TITLE=L\u00e4nderdaten LINK_ADMIN_LIST_COUNTRIES=L\u00e4nder auflisten @@ -390,8 +389,8 @@ ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX=Vorwahl: ADMIN_LIST_MOBILE_PROVIDER_COUNTRY=Land: ADMIN_LIST_MOBILE_PROVIDER_ENTRY_CREATED=Erstellt: ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Editieren oder l\u00f6schen des Handyanbieters -ADMIN_ADD_USER_ENTER_PASSWORD1=Passwort eingeben: -ADMIN_ADD_USER_ENTER_PASSWORD2=Passwort wiederholen: +ADMIN_USER_DATA_ENTER_PASSWORD1=Passwort eingeben: +ADMIN_USER_DATA_ENTER_PASSWORD2=Passwort wiederholen: ADMIN_LIST_USER_ID=Benutzer-Id: ADMIN_LIST_USER_NAME=Benutzername: ADMIN_LIST_USER_GENDER=Anrede: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index be8b9167..e028cdb4 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -286,8 +286,8 @@ CONTENT_TITLE_ADMIN_ADD_USER=Add new user account: TABLE_SUMMARY_ADMIN_LIST_USERS=Administration, list all users ADMIN_ADD_USER_TITLE=Create a new user account ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Please enter at least first name, family name, user name and email address. -ADMIN_PERSONAL_DATA_LEGEND=Personal data of the user: -ADMIN_PERSONAL_DATA_LEGEND_TITLE=Here you can enter the personal data of the new user. +ADMIN_CONTACT_PERSONAL_DATA_LEGEND=Personal data of the user: +ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE=Here you can enter the personal data of the new user. ADMIN_PERSONAL_DATA_GENDER=Select gender: ADMIN_PERSONAL_DATA_FIRST_NAME=First name: ADMIN_PERSONAL_DATA_FAMILY_NAME=Family name: @@ -299,14 +299,13 @@ ADMIN_PERSONAL_DATA_COUNTRY_CODE=Select country: ADMIN_PERSONAL_DATA_PHONE_NUMBER=Phone number: ADMIN_PERSONAL_DATA_FAX_NUMBER=Fax number: ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER=Mobile number: -ADMIN_ADD_USER_EMAIL_LEGEND=User name and email address: -ADMIN_ADD_USER_EMAIL_LEGEND_TITLE=Enter here a user name and email address. -ADMIN_ADD_USER_ENTER_USER_NAME=User name (*1): -ADMIN_ADD_USER_ENTER_EMAIL=Email address (*2): -ADMIN_ADD_USER_USER_NAME_NOTICE=*1: The user name must be unique which is checked by the system for you. -ADMIN_ADD_USER_PASSWORD_NOTICE=Keep both password fields empty to create a random password. The password is being sent to the user's email address after creation of the account. -ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE=*2: The email address must be unique. -ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE=A customer number is being automatically created on creation of the account. +ADMIN_USER_DATA_EMAIL_LEGEND=User name and email address: +ADMIN_USER_DATA_EMAIL_LEGEND_TITLE=Enter here a user name and email address. +ADMIN_USER_DATA_ENTER_USER_NAME=User name (*1): +ADMIN_USER_DATA_ENTER_EMAIL=Email address (*2): +ADMIN_USER_DATA_USER_NAME_NOTICE=*1: The user name must be unique which is checked by the system for you. +ADMIN_USER_DATA_PASSWORD_NOTICE=Keep both password fields empty to create a random password. The password is being sent to the user's email address after creation of the account. +ADMIN_USER_DATA_EMAIL_ADDRESS_NOTICE=*2: The email address must be unique. BUTTON_ADMIN_ADD_USER=Add new user account ADMIN_MENU_COUNTRY_TITLE=Country data LINK_ADMIN_LIST_COUNTRIES=List countries @@ -364,8 +363,8 @@ ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX=Dial prefix: ADMIN_LIST_MOBILE_PROVIDER_COUNTRY=Country: ADMIN_LIST_MOBILE_PROVIDER_ENTRY_CREATED=Created: ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Edit or delete mobile provider -ADMIN_ADD_USER_ENTER_PASSWORD1=Enter password: -ADMIN_ADD_USER_ENTER_PASSWORD2=Repeat password: +ADMIN_USER_DATA_ENTER_PASSWORD1=Enter password: +ADMIN_USER_DATA_ENTER_PASSWORD2=Repeat password: ADMIN_LIST_USER_ID=User id: ADMIN_LIST_USER_NAME=User name: ADMIN_LIST_USER_GENDER=Gender: diff --git a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl new file mode 100644 index 00000000..76e108b1 --- /dev/null +++ b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl @@ -0,0 +1,182 @@ + + + +

+
+ #{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND} + +
+
+ +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+
+ +
+
+ +
+ +
+ + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+ +
+ + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+
+
+
+ diff --git a/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl b/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl new file mode 100644 index 00000000..589fa1e1 --- /dev/null +++ b/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl @@ -0,0 +1,71 @@ + + + +
+
+ #{msg.ADMIN_USER_DATA_EMAIL_LEGEND} + +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
    +
  • #{msg.ADMIN_USER_DATA_USER_NAME_NOTICE}
  • +
  • #{msg.ADMIN_USER_DATA_PASSWORD_NOTICE}
  • +
  • #{msg.ADMIN_USER_DATA_EMAIL_ADDRESS_NOTICE}
  • +
+
+
+
+
diff --git a/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl b/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl index d27c6c1d..2ad070f8 100644 --- a/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl +++ b/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl @@ -9,243 +9,7 @@ #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE} -
-
- #{msg.ADMIN_PERSONAL_DATA_LEGEND} + -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- -
- -
-
- -
-
- -
- -
- - - - -
- -
-
- -
-
- -
- -
- - - - - - - - - - - - -
- -
-
- -
-
- -
- -
- - - - - - - - - - - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
-
-
- -
-
- #{msg.ADMIN_ADD_USER_EMAIL_LEGEND} - -
-
- -
- -
- -
- -
-
- -
-
- -
- -
- -
- -
-
- -
- -
-
- -
- -
- -
- -
-
- -
-
- -
- -
- -
- -
-
- -
-
    -
  • #{msg.ADMIN_ADD_USER_USER_NAME_NOTICE}
  • -
  • #{msg.ADMIN_ADD_USER_PASSWORD_NOTICE}
  • -
  • #{msg.ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE}
  • -
  • #{msg.ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE}
  • -
-
-
-
+ diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index 123924a4..33695cb4 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -23,9 +23,20 @@ - - - +
+ #{msg.ADMIN_EDIT_USER_TITLE} +
+ +
+ #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE} +
+ + + +
-- 2.39.5