]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued a lot more:
authorRoland Häder <roland@mxchange.org>
Tue, 26 Apr 2016 15:57:13 +0000 (17:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 5 May 2016 16:54:30 +0000 (18:54 +0200)
- added ability to link any contact with user and/or customer accounts (later is unfinished)
- to make thism working, a controller method selectableContacts() is needed (cached)
- also the event for administrators adding users (customers missing!) must be observed to remove contact from selectable list
- because of the above, the HTML form can no longer validate required="true", it must be done by the controller (ugly exceptions for now)
- some beans/controllers loaded/injected
- added missing i18n strings
- fixed some exception messages
- ignored strings for i18n
- changed CSS class in admin area pages from small to medium (needs more space)
- removed double underscore (one removed)

Signed-off-by: Roland Häder <roland@mxchange.org>
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/login/login_base.tpl
web/admin/user/admin_user_list.xhtml
web/resources/css/cssLayout.css

index 145bb04267540922badbe5bf67267ca71d19e866..2290545442ac27b9b4deb51c0f05ddefb518f889 100644 (file)
@@ -2,59 +2,63 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="login/login_change_password.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="privacy.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="user/resend_link.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="index.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="user/register_done.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="*" x="400" y="300" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="user/login_error.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="user/show_addressbook_entries.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="user/lost_passwd.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="user/login.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="privacy.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/index.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="user/resend_link.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/index.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="index.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="user/register_done.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="*" x="150" y="300" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="user/login_error.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="user/show_addressbook_entries.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="user/lost_passwd.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="user/login.xhtml" x="650" y="1200" zoom="true"/>
         <Node id="login/login_contact_data_saved.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="login/login_data_saved.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="exception.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="login/login_data_saved.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="exception.xhtml" x="2400" y="150" zoom="true"/>
         <Node id="user/register.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="login/login_add_addressbook.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="login/login_own_addressbooks.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="terms.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="login/login_user_data_saved.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="user/user_list.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="logout.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="login/login_change_personal_data.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="user/show_addressbook.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="imprint.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="login/login_change_email_address.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="login/login_add_addressbook.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="login/login_own_addressbooks.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="login/index.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="terms.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="user/user_list.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="login/login_user_data_saved.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="logout.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="imprint.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="user/show_addressbook.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="login/login_change_email_address.xhtml" x="650" y="150" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 1203e058e56a153a61948627f1d44bdd9060bb3d..e9a8badf8391c0110d344834ec69bb1cc28eef9b 100644 (file)
@@ -237,13 +237,13 @@ public class JobsContactWebSessionBean implements JobsContactWebSessionControlle
                        throw new NullPointerException("event is null"); //NOI18N
                } else if (event.getUpdatedContact() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("event.user is null"); //NOI18N
+                       throw new NullPointerException("event.updatedUser is null"); //NOI18N
                } else if (event.getUpdatedContact().getContactId() == null) {
                        // userId is null
-                       throw new NullPointerException("event.user.userId is null"); //NOI18N
+                       throw new NullPointerException("event.updatedUser.userId is null"); //NOI18N
                } else if (event.getUpdatedContact().getContactId() < 1) {
                        // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
                }
 
                // Get iterator from list
index b2c52c38be7bceabcf8aceb2ab80eee8e4e92caf..12fb82983b8cd7eb82c4418a252fc2d55c6b247e 100644 (file)
@@ -143,36 +143,78 @@ public class JobsAdminUserWebRequestBean implements JobsAdminUserWebRequestContr
        @Override
        public String addUser () {
                // Create new user instance
-               User localUser = new LoginUser();
+               User user = new LoginUser();
+
+               // As the form cannot validate the data (required="true"), check it here
+               if (this.getUserName() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("userName is null"); //NOI18N
+               } else if (this.getUserName().isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("userName is null"); //NOI18N
+               } else if (this.adminHelper.getContact() == null) {
+                       // No contact instance set, so test required fields: gender, first name and family name
+                       if (this.contactController.getGender() == null) {
+                               // Throw NPE again
+                               throw new NullPointerException("contactController.gender is null"); //NOI18N
+                       } else if (this.contactController.getFirstName() == null) {
+                               // ... and again
+                               throw new NullPointerException("contactController.firstName is null"); //NOI18N //NOI18N
+                       } else if (this.contactController.getFirstName().isEmpty()) {
+                               // ... and again
+                               throw new IllegalArgumentException("contactController.firstName is empty");
+                       } else if (this.contactController.getFamilyName() == null) {
+                               // ... and again
+                               throw new NullPointerException("contactController.familyName is null"); //NOI18N
+                       } else if (this.contactController.getFamilyName().isEmpty()) {
+                               // ... and again
+                               throw new IllegalArgumentException("contactController.familyName is empty"); //NOI18N //NOI18N
+                       } else if (this.contactController.getEmailAddress()== null) {
+                               // ... and again
+                               throw new NullPointerException("contactController.emailAddress is null");
+                       } else if (this.contactController.getEmailAddress().isEmpty()) {
+                               // ... and again
+                               throw new IllegalArgumentException("contactController.emailAddress is empty"); //NOI18N //NOI18N
+                       } else if (this.contactController.getEmailAddressRepeat()== null) {
+                               // ... and again
+                               throw new NullPointerException("contactController.emailAddressRepeat is null");
+                       } else if (this.contactController.getEmailAddressRepeat().isEmpty()) {
+                               // ... and again
+                               throw new IllegalArgumentException("contactController.emailAddressRepeat is empty"); //NOI18N //NOI18N
+                       } else if (!Objects.equals(this.contactController.getEmailAddress(), this.contactController.getEmailAddressRepeat())) {
+                               // Is not same email address
+                               throw new IllegalArgumentException("Both entered email addresses don't match.");
+                       }
+               }
 
                // Set user name, CONFIRMED and INVISIBLE
-               localUser.setUserName(this.getUserName());
-               localUser.setUserAccountStatus(UserAccountStatus.CONFIRMED);
-               localUser.setUserProfileMode(ProfileMode.INVISIBLE);
+               user.setUserName(this.getUserName());
+               user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
+               user.setUserProfileMode(ProfileMode.INVISIBLE);
 
                // Create contact instance
                Contact contact = this.contactController.createContactInstance();
 
                // Set contact in user
-               localUser.setUserContact(contact);
+               user.setUserContact(contact);
 
                // Init variable for password
                String password = null;
 
                // Is the user name or email address used already?
                // @TODO Add password length check
-               if (this.userController.isUserNameRegistered(localUser)) {
+               if (this.userController.isUserNameRegistered(user)) {
                        // User name is already used
-                       throw new FaceletException(new UserNameAlreadyRegisteredException(localUser));
-               } else if (this.contactController.isEmailAddressRegistered(localUser.getUserContact())) {
+                       throw new FaceletException(new UserNameAlreadyRegisteredException(user));
+               } else if ((this.adminHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
                        // Email address is already used
-                       throw new FaceletException(new EmailAddressAlreadyRegisteredException(localUser));
+                       throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
                } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
                        // Empty password entered, then generate one
                        password = UserUtils.createRandomPassword(JobsUserWebSessionController.MINIMUM_PASSWORD_LENGTH);
                } else if (!this.isSamePasswordEntered()) {
                        // Both passwords don't match
-                       throw new FaceletException(new UserPasswordRepeatMismatchException(localUser));
+                       throw new FaceletException(new UserPasswordRepeatMismatchException(user));
                } else {
                        // Both match, so get it from this bean
                        password = this.getUserPassword();
@@ -183,15 +225,21 @@ public class JobsAdminUserWebRequestBean implements JobsAdminUserWebRequestContr
                assert (password.length() >= JobsUserWebSessionController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N
 
                // Encrypt password and set it
-               localUser.setUserEncryptedPassword(UserUtils.encryptPassword(password));
+               user.setUserEncryptedPassword(UserUtils.encryptPassword(password));
 
                // Init updated user instance
                User updatedUser = null;
 
                try {
                        // Now, that all is set, call EJB
-                       updatedUser = this.userBean.addUser(localUser);
-               } catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
+                       if (this.adminHelper.getContact() instanceof Contact) {
+                               // Link contact with this user
+                               updatedUser = this.userBean.linkUser(user);
+                       } else {
+                               // Add new contact
+                               updatedUser = this.userBean.addUser(user);
+                       }
+                       } catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
                        // Throw again
                        throw new FaceletException(ex);
                }
index d5ab49264364856b74233b9116056124257a05ae..21bbde26e002c3642abf7f0455fb35eb8bb41f2e 100644 (file)
@@ -142,7 +142,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
        @Override
        public void afterRegistrationEvent (final @Observes UserRegisteredEvent event) {
                // Trace message
-               System.out.println(MessageFormat.format("UserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N
 
                // event should not be null
                if (null == event) {
@@ -163,7 +163,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                User registeredUser = event.getRegisteredUser();
 
                // Debug message
-               System.out.println(MessageFormat.format("UserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N
 
                // Copy all data from registered->user
                this.copyUser(registeredUser);
@@ -184,13 +184,13 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                }
 
                // Trace message
-               System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
        }
 
        @Override
        public void afterUserLogin (final @Observes UserLoggedInEvent event) {
                // Trace message
-               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
 
                // event should not be null
                if (null == event) {
@@ -214,7 +214,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                this.copyUser(event.getLoggedInUser());
 
                // Trace message
-               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
        }
 
        @Override
index 988756c8415c2a74c698e2163a823cc91b282c07..0d74bfab19b5986d2ad1ab57e9a398a7060aa959 100644 (file)
                </navigation-case>
        </navigation-rule>
        <navigation-rule>
-<<<<<<< HEAD
-=======
-               <from-view-id>/user/login.xhtml</from-view-id>
+               <from-view-id>/guest/user/login.xhtml</from-view-id>
                <navigation-case>
                        <from-outcome>login</from-outcome>
-                       <to-view-id>/login/login_index.xhtml</to-view-id>
+                       <to-view-id>/user/login_index.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>login_index</from-outcome>
-                       <to-view-id>/login/index.xhtml</to-view-id>
+                       <to-view-id>/user/index.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
        <navigation-rule>
->>>>>>> 8eb0fb9... added initial login templates and navigation rules
                <from-view-id>/user/register.xhtml</from-view-id>
                <navigation-case>
                        <from-outcome>register_done</from-outcome>
index 0a2d405d1aa216e6173319b680f801aa5400eda9..dafc778692108fb3ae5f4c43c7fe87dc1a97f7f4 100644 (file)
@@ -2,7 +2,6 @@
 <ui:composition
        template="/WEB-INF/templates/base.tpl"
        xmlns="http://www.w3.org/1999/xhtml"
-<<<<<<< HEAD
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:h="http://xmlns.jcp.org/jsf/html">
 
@@ -20,9 +19,4 @@
        <ui:define name="footer">
                <ui:include id="footer" class="login_footer" src="/WEB-INF/templates/login/login_footer.tpl" />
        </ui:define>
-=======
-       xmlns:ui="http://java.sun.com/jsf/facelets">
-
-       <ui:define name="title">Benutzerbereich - <ui:insert name="login_title" class="login_title" /></ui:define>
->>>>>>> b5abdb2... added initial login templates and navigation rules
 </ui:composition>
index de99760136709adfc5faf105022c78696f64b4d7..c0168f1d14f3667c3cfdf4c7fb2be4a9bfa5fc2c 100644 (file)
                                </h:column>
                        </h:dataTable>
 
-                       <div class="table">
+                       <div class="table_medium">
                                <h:form id="admin_add_user">
                                        <div class="table_header">
                                                #{msg.ADMIN_ADD_USER_TITLE}
                                        </div>
 
+                                       <div class="para">
+                                               <fieldset id="user_contact">
+                                                       <legend title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}">#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}</legend>
+
+                                                       <div class="table_row">
+                                                               <div class="table_left_medium">
+                                                                       <h:outputLabel for="userContact" value="#{msg.ADMIN_SELECT_USER_CONTACT}" />
+                                                               </div>
+
+                                                               <div class="table_right_medium">
+                                                                       <h:selectOneMenu class="select" id="userContact" value="#{adminHelper.contact}" converter="ContactConverter">
+                                                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                                                               <f:selectItems value="#{userController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
+                                                                       </h:selectOneMenu>
+                                                               </div>
+
+                                                               <div class="clear"></div>
+                                                       </div>
+                                               </fieldset>
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.ADMIN_ADD_OR_ENTER_CONTACT_DATA}" />
+                                       </div>
+
                                        <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" />
 
                                        <div class="table_footer">
index e48de8b502f1d085385f2ab858c55818a4fb9491..703d40b3340bd36f4ba214c5f1681dfca6fb2615 100644 (file)
@@ -109,7 +109,7 @@ table, .table, .table_medium {
 }
 
 .table_right_medium {
-       width: 250px;
+       width: 300px;
        min-height: 20px;
        float: right;
 }