From: Roland Häder Date: Thu, 21 Apr 2016 08:38:05 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=22273e71574e8f258bc60e1ddd7fe67afe70f715;p=jfinancials-war.git 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) Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index eae1bfe8..1805a99b 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -31,6 +31,7 @@ import javax.inject.Named; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; +import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.events.user.AdminAddedUserEvent; import org.mxchange.jusercore.events.user.AdminUserAddedEvent; @@ -44,7 +45,6 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; -import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; /** * A user bean (controller) @@ -78,6 +78,12 @@ public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserW */ private final UserSessionBeanRemote userBean; + /** + * Regular user controller + */ + @Inject + private AddressbookUserWebSessionController userController; + /** * A list of all user profiles */ @@ -98,18 +104,6 @@ public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserW */ private String userPasswordRepeat; - /** -<<<<<<< HEAD:src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java - ZIP code - */ - private Integer zipCode; - - /** - * Regular user controller - */ - @Inject - private AddressbookUserWebSessionController userController; - /** * Default constructor */ @@ -202,6 +196,11 @@ public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserW 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/addressbook/beans/user/AddressbookAdminUserWebRequestController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java index c2e24241..c697530c 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java @@ -61,6 +61,11 @@ public interface AddressbookAdminUserWebRequestController 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 fbb67f79..217b436f 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -342,8 +342,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: @@ -355,14 +355,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 @@ -420,8 +419,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 54609eab..0aa276b1 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -316,8 +316,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: @@ -329,14 +329,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 @@ -394,8 +393,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} +
+ + + +