]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 08:38:05 +0000 (10:38 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 21 Apr 2016 18:29:06 +0000 (20:29 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/user/admin_form_user_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl
web/admin/user/admin_user_edit.xhtml

index eae1bfe8b70b761b215ee31e2812c5e44251bd8e..1805a99bcdc1a962bc58eb3b78f54a93a65c0bc6 100644 (file)
@@ -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;
index c2e242414f3e3f3d5508ed0bf5e06ba2843fe3a1..c697530c0be233d9291a8b5cdb3564d24ec3310f 100644 (file)
@@ -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
         * <p>
index fbb67f7900a5b84573068d7f0f958c2f4dec9909..217b436fed2d219e0d53c465ba95088be5c1d81b 100644 (file)
@@ -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:
index 54609eab8f2ce0003a63beaab28b9ba98254e894..0aa276b18f19edc5ab1474e0d3949eba1252e8c5 100644 (file)
@@ -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 (file)
index 0000000..76e108b
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <div class="para">
+               <fieldset id="personal_data">
+                       <legend title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}">#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}</legend>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="gender" value="#{msg.ADMIN_PERSONAL_DATA_GENDER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl">
+                                               <ui:param name="targetController" value="#{adminContactController}" />
+                                       </ui:include>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="firstName" value="#{msg.ADMIN_PERSONAL_DATA_FIRST_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{adminContactController.firstName}" required="true">
+                                               <f:validator for="firstName" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="familyName" value="#{msg.ADMIN_PERSONAL_DATA_FAMILY_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{adminContactController.familyName}" required="true">
+                                               <f:validator for="familyName" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="street" value="#{msg.ADMIN_PERSONAL_DATA_STREET}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="street" size="20" maxlength="255" value="#{adminContactController.street}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="houseNumber" value="#{msg.ADMIN_PERSONAL_DATA_HOUSE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{adminContactController.houseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
+                                               <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="zipCode" value="#{msg.ADMIN_PERSONAL_DATA_ZIP_CODE}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{adminContactController.zipCode}" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
+                                               <f:validateLongRange for="zipCode" minimum="1" maximum="99999" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="city" value="#{msg.ADMIN_PERSONAL_DATA_CITY}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="city" size="10" maxlength="255" value="#{adminContactController.city}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="country" value="#{msg.ADMIN_PERSONAL_DATA_COUNTRY_CODE}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="country" value="#{adminContactController.country}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryCode} (#{msg[c.countryI18nkey]})" />
+                                       </h:selectOneMenu>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel value="#{msg.ADMIN_PERSONAL_DATA_PHONE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="countryPhoneCode" value="#{adminContactController.phoneCountry}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText class="input" id="phoneAreaCode" size="5" maxlength="10" value="#{adminContactController.phoneAreaCode}">
+                                               <f:validator for="phoneAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText class="input" id="phoneNumber" size="10" maxlength="20" value="#{adminContactController.phoneNumber}">
+                                               <f:validator for="phoneNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="faxNumber" value="#{msg.ADMIN_PERSONAL_DATA_FAX_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="faxCountryCode" value="#{adminContactController.faxCountry}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText class="input" id="faxAreaCode" size="5" maxlength="10" value="#{adminContactController.faxAreaCode}">
+                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText class="input" id="faxNumber" size="10" maxlength="20" value="#{adminContactController.faxNumber}">
+                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="cellphoneNumber" value="#{msg.ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <ui:include src="/WEB-INF/templates/generic/mobile_selection_box.tpl">
+                                               <ui:param name="targetController" value="#{adminContactController}" />
+                                       </ui:include>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
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 (file)
index 0000000..589fa1e
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <div class="para">
+               <fieldset id="login_data">
+                       <legend title="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND_TITLE}">#{msg.ADMIN_USER_DATA_EMAIL_LEGEND}</legend>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="userName" value="#{msg.ADMIN_USER_DATA_ENTER_USER_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="userName" size="20" maxlength="255" value="#{adminUserController.userName}" required="true" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="emailAddress" value="#{msg.ADMIN_USER_DATA_ENTER_EMAIL}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{adminContactController.emailAddress}" required="true" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="para"></div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="password1" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD1}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{adminUserController.userPassword}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="password2" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD2}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{adminUserController.userPasswordRepeat}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="para notice">
+                               <ul>
+                                       <li>#{msg.ADMIN_USER_DATA_USER_NAME_NOTICE}</li>
+                                       <li>#{msg.ADMIN_USER_DATA_PASSWORD_NOTICE}</li>
+                                       <li>#{msg.ADMIN_USER_DATA_EMAIL_ADDRESS_NOTICE}</li>
+                               </ul>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
index d27c6c1d6f0163aa4748269c926cdb703aef7660..2ad070f845967b5b748a7fd0d491f087ed6519c6 100644 (file)
@@ -9,243 +9,7 @@
                #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE}
        </div>
 
-       <div class="para">
-               <fieldset id="personal_data">
-                       <legend title="#{msg.ADMIN_PERSONAL_DATA_LEGEND_TITLE}">#{msg.ADMIN_PERSONAL_DATA_LEGEND}</legend>
+       <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" />
 
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="gender" value="#{msg.ADMIN_PERSONAL_DATA_GENDER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminContactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="firstName" value="#{msg.ADMIN_PERSONAL_DATA_FIRST_NAME}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{adminContactController.firstName}" required="true">
-                                               <f:validator for="firstName" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="familyName" value="#{msg.ADMIN_PERSONAL_DATA_FAMILY_NAME}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{adminContactController.familyName}" required="true">
-                                               <f:validator for="familyName" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="street" value="#{msg.ADMIN_PERSONAL_DATA_STREET}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="street" size="20" maxlength="255" value="#{adminContactController.street}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="houseNumber" value="#{msg.ADMIN_PERSONAL_DATA_HOUSE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{adminContactController.houseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
-                                               <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="zipCode" value="#{msg.ADMIN_PERSONAL_DATA_ZIP_CODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{adminContactController.zipCode}" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
-                                               <f:validateLongRange for="zipCode" minimum="1" maximum="99999" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="city" value="#{msg.ADMIN_PERSONAL_DATA_CITY}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="city" size="10" maxlength="255" value="#{adminContactController.city}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="country" value="#{msg.ADMIN_PERSONAL_DATA_COUNTRY_CODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu class="select" id="country" value="#{adminContactController.country}" converter="country">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryCode} (#{msg[c.countryI18nkey]})" />
-                                       </h:selectOneMenu>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel value="#{msg.ADMIN_PERSONAL_DATA_PHONE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu class="select" id="countryPhoneCode" value="#{adminContactController.phoneCountry}" converter="country">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText class="input" id="phoneAreaCode" size="5" maxlength="10" value="#{adminContactController.phoneAreaCode}">
-                                               <f:validator for="phoneAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText class="input" id="phoneNumber" size="10" maxlength="20" value="#{adminContactController.phoneNumber}">
-                                               <f:validator for="phoneNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="faxNumber" value="#{msg.ADMIN_PERSONAL_DATA_FAX_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu class="select" id="faxCountryCode" value="#{adminContactController.faxCountry}" converter="country">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText class="input" id="faxAreaCode" size="5" maxlength="10" value="#{adminContactController.faxAreaCode}">
-                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText class="input" id="faxNumber" size="10" maxlength="20" value="#{adminContactController.faxNumber}">
-                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="cellphoneNumber" value="#{msg.ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/mobile_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminContactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-               </fieldset>
-       </div>
-
-       <div class="para">
-               <fieldset id="login_data">
-                       <legend title="#{msg.ADMIN_ADD_USER_EMAIL_LEGEND_TITLE}">#{msg.ADMIN_ADD_USER_EMAIL_LEGEND}</legend>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="userName" value="#{msg.ADMIN_ADD_USER_ENTER_USER_NAME}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="userName" size="20" maxlength="255" value="#{adminUserController.userName}" required="true" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="emailAddress" value="#{msg.ADMIN_ADD_USER_ENTER_EMAIL}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{adminContactController.emailAddress}" required="true" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="para"></div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="password1" value="#{msg.ADMIN_ADD_USER_ENTER_PASSWORD1}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{adminUserController.userPassword}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="password2" value="#{msg.ADMIN_ADD_USER_ENTER_PASSWORD2}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{adminUserController.userPasswordRepeat}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="para notice">
-                               <ul>
-                                       <li>#{msg.ADMIN_ADD_USER_USER_NAME_NOTICE}</li>
-                                       <li>#{msg.ADMIN_ADD_USER_PASSWORD_NOTICE}</li>
-                                       <li>#{msg.ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE}</li>
-                                       <li>#{msg.ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE}</li>
-                               </ul>
-                       </div>
-               </fieldset>
-       </div>
+       <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_data.tpl" />
 </ui:composition>
index 123924a444a672beebe75ccd023ef541010b6ff0..33695cb4963b01e04c2130f1f1e40d5371fc82fe 100644 (file)
                        <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
 
                        <h:form id="admin_edit_user" rendered="#{not empty adminHelper.user}">
-                               <f:metadata>
-                                       <f:viewAction action="#{adminHelper.copyUserToController()}" />
-                               </f:metadata>
+                               <div class="table_header">
+                                       #{msg.ADMIN_EDIT_USER_TITLE}
+                               </div>
+
+                               <div class="para notice">
+                                       #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE}
+                               </div>
+
+                               <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_data.tpl" />
+
+                               <div class="table_footer">
+                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                       <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" />
+                               </div>
                        </h:form>
                </ui:define>
        </ui:composition>