]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 16:24:32 +0000 (18:24 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 19:49:19 +0000 (21:49 +0200)
- renamed business_data -> business_basic_data
- renamed CONTACT_BUSINESS -> BUSINESS_BASIC_DATA and prevented double _DATA
- need to check on value, not converted email address: if e.g. an empty email
  address is submitted, JSF seem to handle it as NULL, not empty, which makes
  sense here at the converter, as 'value' is of type Object and not String

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/admin/admin_menu.tpl
web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/business_data/admin_form_business_data.tpl [deleted file]
web/admin/business_basic_data/admin_business_basic_data_list.xhtml [new file with mode: 0644]
web/admin/business_data/admin_business_data_list.xhtml [deleted file]

index 4afd8e1d1807db0ee4bd6d5b30a72802e6a6961d..c4a820bb86ef2e5e7e3869ea8716dab9ec0b87c9 100644 (file)
@@ -76,16 +76,19 @@ public class JobsEmailAddressValidator extends BaseStringValidator implements Va
                // Pre-validation (example: not null, not a string, empty string ...)
                super.preValidate(context, component, value, requiredFields, allowEmpty);
 
-               // Get string from object ... ;-)
-               // @TODO Add IDN support (GNU lib?) Search for emailAddressRepeat
-               String emailAddress = String.valueOf(value);
-
                // Is the email address empty and allowed?
-               if (emailAddress.isEmpty() && allowEmpty) {
+               if (null == value && allowEmpty) {
                        // Then accept this here
                        return;
+               } else if (null == value) {
+                       // Abort here
+                       throw new ValidatorException(new FacesMessage("No empty email address allowed.")); //NOI18N
                }
 
+               // Get string from object ... ;-)
+               // @TODO Add IDN support (GNU lib?) Search for emailAddressRepeat
+               String emailAddress = String.valueOf(value).trim();
+
                // Checks if the email address matches a regex ("low-level" check)
                // @TODO Should also be done by <f:validatorRegex />)
                boolean matches = EMAIL_PATTERN.matcher(emailAddress).matches(); //NOI18N
index aba99ffe2517148b86f264ceb94d636c09fdae6c..75c3bb4e8b0ae9a664819cc1cea31a819c9727b1 100644 (file)
@@ -809,50 +809,50 @@ GUEST_REGISTRATION_PASSWORD_NOT_ENTERED=Bitte geben Sie ein Passwort ein. Dies m
 GUEST_REGISTRATION_PASSWORD_REPEAT_NOT_ENTERED=Bitte wiederholen Sie das eingegebene Passwort. Dies wird zur Bestaetigung benoetigt.
 PAGE_TITLE_ADMIN_AREA=Administration
 #@TODO Please fix German umlauts!
-ADMIN_MENU_CONTACT_BUSINESS_TITLE=Geschaeftliche Kontakte
+ADMIN_MENU_BUSINESS_BASIC_DATA_TITLE=Geschaeftliche Kontakte
 #@TODO Please fix German umlauts!
-LINK_ADMIN_LIST_CONTACT_BUSINESS=Geschaeftskontakte auflisten
+LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=Geschaeftskontakte auflisten
 #@TODO Please fix German umlauts!
-LINK_ADMIN_LIST_CONTACT_BUSINESS_TITLE=Listet geschaeftliche Kontakte auf
+LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Listet geschaeftliche Kontakte auf
 #@TODO Please fix German umlauts!
-LINK_ADMIN_EXPORT_CONTACT_BUSINESS=Geschaeftliche Kontakte exportieren
+LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Geschaeftliche Kontakte exportieren
 #@TODO Please fix German umlauts!
-LINK_ADMIN_EXPORT_CONTACT_BUSINESS_TITLE=Exportiert geschaeftliche Kontakte
+LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exportiert geschaeftliche Kontakte
 #@TODO Please fix German umlauts!
-PAGE_TITLE_ADMIN_LIST_CONTACT_BUSINESS=Geschaeftliche Kontakte auflisten
+PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Geschaeftliche Kontakte auflisten
 #@TODO Please fix German umlauts!
-CONTENT_TITLE_ADMIN_LIST_CONTACT_BUSINESS=Auflisten von geschaeftlichen Kontakt
+CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Auflisten von geschaeftlichen Kontakt
 #@TODO Please fix German umlauts!
-ADMIN_CONTACT_BUSINESS_LIST_EMPTY=Es befinden sich keine geschaeftlichen Kontakte in der Datenbank.
+ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=Es befinden sich keine geschaeftlichen Kontakte in der Datenbank.
 #@TODO Please fix German umlauts!
-TABLE_SUMMARY_ADMIN_LIST_CONTACT_BUSINESS=Tabelle listet geschaeftliche Kontakte auf.
-ADMIN_CONTACT_BUSINESS_ID=Id-Nummer:
+TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=Tabelle listet geschaeftliche Kontakte auf.
+ADMIN_BUSINESS_BASIC_DATA_ID=Id-Nummer:
 #@TODO Please fix German umlauts!
 ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE=Details des geschaeftlichen Kontaktes anzeigen.
-ADMIN_CONTACT_BUSINESS_OWNER_ID=Zugew. Benutzer:
-ADMIN_LINK_SHOW_CONTACT_BUSINESS_OWNER_USER_TITLE=Benutzerprofil des zugewiesenen Benutzers anzeigen.
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER=Zuweisen
+ADMIN_BUSINESS_BASIC_DATA_OWNER_ID=Zugew. Benutzer:
+ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Benutzerprofil des zugewiesenen Benutzers anzeigen.
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER=Zuweisen
 #@TODO Please fix German umlauts!
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER_TITLE=Geschaeftlichen Kontakt einen Benutzeraccount zuweisen.
-ADMIN_CONTACT_BUSINESS_COMPANY_NAME=Firmenname:
-ADMIN_CONTACT_BUSINESS_CONTACT_PERSON=Ansprechpartner:
-ADMIN_LINK_SHOW_CONTACT_BUSINESS_CONTACT_PERSON_TITLE=Zeigt einen Mitarbeiter an, der als Ansprechpartner eingetragen ist.
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON=Zuweisen
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Geschaeftlichen Kontakt einen Benutzeraccount zuweisen.
+ADMIN_BUSINESS_BASIC_DATA_COMPANY_NAME=Firmenname:
+ADMIN_BUSINESS_BASIC_DATA_CONTACT_PERSON=Ansprechpartner:
+ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE=Zeigt einen Mitarbeiter an, der als Ansprechpartner eingetragen ist.
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON=Zuweisen
 #@TODO Please fix German umlauts!
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON_TITLE=Weisst einen Mitarbeiter als Ansprechpartner des geschaftlichen Kontaktes zu.
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE=Weisst einen Mitarbeiter als Ansprechpartner des geschaftlichen Kontaktes zu.
 ADMIN_SHOW_FULL_CONTACT_DATA_TITLE=Zeigt das komplette Kontaktprofil an.
 ADMIN_BUSINESS_DATA_COMPANY_COMMENTS=Anmerkungen:
 ADMIN_BUSINESS_DATA_PHONE_NUMBER=Haupttelefonnummer:
 ADMIN_BUSINESS_DATA_FAX_NUMBER=Hauptfaxnummer:
 #@TODO Please fix German umlauts!
-ADMIN_ADD_CONTACT_BUSINESS_TITLE=Neuen geschaeftlichen Kontakt hinzufuegen
-ADMIN_ADD_CONTACT_BUSINESS_MINIMUM_DATA=Bitte mindestens Firmennamen inklusive Rechtsform ein.
+ADMIN_ADD_BUSINESS_BASIC_DATA_TITLE=Neuen geschaeftlichen Kontakt hinzufuegen
+ADMIN_ADD_BUSINESS_BASIC_DATA_MINIMUM_DATA=Bitte mindestens Firmennamen inklusive Rechtsform ein.
 #@TODO Please fix German umlauts!
 ENTERED_EMAIL_ADDRESS_IS_INVALID=Die eingegebene Email-Addresse entspricht nicht dem gueltigen Format.
 #@TODO Please fix German umlauts!
-ADMIN_CONTACT_BUSINESS_DATA_LEGEND=Basisdaten fuer geschaeftlichen Kontakt:
+ADMIN_BUSINESS_BASIC_DATA_LEGEND=Basisdaten fuer geschaeftlichen Kontakt:
 #@TODO Please fix German umlauts!
-ADMIN_CONTACT_BUSINESS_DATA_LEGEND_TITLE=Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
+ADMIN_BUSINESS_BASIC_DATA_LEGEND_TITLE=Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
 ADMIN_BUSINESS_DATA_COMPANY_NAME=Firmenname:
 ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Bitte geben Sie den Firmennamen inklusive Rechtsform ein.
 ADMIN_BUSINESS_DATA_COMPANY_LEGAL_STATUS=Rechtsform (z.B. GmbH):
index 01b0805fc9f096f4c7f699c4f51186071df6bfe0..96a5070cf8c94fabddbaa75b44d22e8f50df6109 100644 (file)
@@ -803,36 +803,36 @@ GUEST_REGISTRATION_USER_PASSWORDS_EMPTY_NOT_ALLOWED=You have to enter an own pas
 GUEST_REGISTRATION_PASSWORD_NOT_ENTERED=Please enter a password. This must match with security rules.
 GUEST_REGISTRATION_PASSWORD_REPEAT_NOT_ENTERED=Please repeat the entered password. This done to confirm the password.
 PAGE_TITLE_ADMIN_AREA=Administration
-ADMIN_MENU_CONTACT_BUSINESS_TITLE=Business Contacts
-LINK_ADMIN_LIST_CONTACT_BUSINESS=List business contacts
-LINK_ADMIN_LIST_CONTACT_BUSINESS_TITLE=Lists business contacts
-LINK_ADMIN_EXPORT_CONTACT_BUSINESS=Export business contacts
-LINK_ADMIN_EXPORT_CONTACT_BUSINESS_TITLE=Exports business contacts
-PAGE_TITLE_ADMIN_LIST_CONTACT_BUSINESS=List business contacts
-CONTENT_TITLE_ADMIN_LIST_CONTACT_BUSINESS=Lists business contacts
-ADMIN_CONTACT_BUSINESS_LIST_EMPTY=There are currently no business contacts in database.
-TABLE_SUMMARY_ADMIN_LIST_CONTACT_BUSINESS=This table lists business contacts.
-ADMIN_CONTACT_BUSINESS_ID=Id Number:
+ADMIN_MENU_BUSINESS_BASIC_DATA_TITLE=Business Contacts
+LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=List business contacts
+LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Lists business contacts
+LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Export business contacts
+LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exports business contacts
+PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=List business contacts
+CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Lists business contacts
+ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=There are currently no business contacts in database.
+TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=This table lists business contacts.
+ADMIN_BUSINESS_BASIC_DATA_ID=Id Number:
 ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE=Show details of this business contact.
-ADMIN_CONTACT_BUSINESS_OWNER_ID=Assigned user:
-ADMIN_LINK_SHOW_CONTACT_BUSINESS_OWNER_USER_TITLE=Shows assigned user profile.
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER=Assign
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER_TITLE=Assigns this business contact to a user account.
-ADMIN_CONTACT_BUSINESS_COMPANY_NAME=Company name:
-ADMIN_CONTACT_BUSINESS_CONTACT_PERSON=Contact person:
-ADMIN_LINK_SHOW_CONTACT_BUSINESS_CONTACT_PERSON_TITLE=Shows a single employee entry who has been assigned as contact person.
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON=Assign
-ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON_TITLE=Assigns an employee as a contact person for given business contact.
+ADMIN_BUSINESS_BASIC_DATA_OWNER_ID=Assigned user:
+ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Shows assigned user profile.
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER=Assign
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Assigns this business contact to a user account.
+ADMIN_BUSINESS_BASIC_DATA_COMPANY_NAME=Company name:
+ADMIN_BUSINESS_BASIC_DATA_CONTACT_PERSON=Contact person:
+ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE=Shows a single employee entry who has been assigned as contact person.
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON=Assign
+ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE=Assigns an employee as a contact person for given business contact.
 ADMIN_SHOW_FULL_CONTACT_DATA_TITLE=Shows complete contact profile.
 ADMIN_BUSINESS_DATA_COMPANY_COMMENTS=Comments:
 ADMIN_BUSINESS_DATA_PHONE_NUMBER=Main phone number:
 ADMIN_BUSINESS_DATA_FAX_NUMBER=Main fax number:
-ADMIN_ADD_CONTACT_BUSINESS_TITLE=Add new business contact
-ADMIN_ADD_CONTACT_BUSINESS_MINIMUM_DATA=Please enter at least company name including legal status.
+ADMIN_ADD_BUSINESS_BASIC_DATA_TITLE=Add new business contact
+ADMIN_ADD_BUSINESS_BASIC_DATA_MINIMUM_DATA=Please enter at least company name including legal status.
 ENTERED_EMAIL_ADDRESS_IS_INVALID=Your entered email address is not valid.
-ADMIN_CONTACT_BUSINESS_DATA_LEGEND=Basic data for business contact:
+ADMIN_BUSINESS_BASIC_DATA_LEGEND=Basic data for business contact:
 #Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
-ADMIN_CONTACT_BUSINESS_DATA_LEGEND_TITLE=Enter basic data for a business contact.
+ADMIN_BUSINESS_BASIC_DATA_LEGEND_TITLE=Enter basic data for a business contact.
 ADMIN_BUSINESS_DATA_COMPANY_NAME=Company name:
 ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Please enter the company's name including legal status.
 ADMIN_BUSINESS_DATA_COMPANY_LEGAL_STATUS=Legal status (e.g. Inc.):
index 99fd5d65055fcd20b0664194da9898c17858ffb1..41a4db7e031b5a3a7a9865f6c8b891065546b947 100644 (file)
                        <to-view-id>/admin/contact/admin_contact_export.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
-                       <from-outcome>admin_list_business_data</from-outcome>
-                       <to-view-id>/admin/business_data/admin_business_data_list.xhtml</to-view-id>
+                       <from-outcome>admin_list_business_basic_data</from-outcome>
+                       <to-view-id>/admin/business_basic_data/admin_business_basic_data_list.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
-                       <from-outcome>admin_export_business_data</from-outcome>
-                       <to-view-id>/admin/business_data/admin_business_data_export.xhtml</to-view-id>
+                       <from-outcome>admin_export_business_basic_data</from-outcome>
+                       <to-view-id>/admin/business_basic_data/admin_business_basic_data_export.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_list_user</from-outcome>
index 05270cc256ef87e399a443c12910b0bd5db04da2..13b0cfd44f98694408859d10e1e3b802bd795767 100644 (file)
 
                        <ui:fragment rendered="#{featureController.isFeatureEnabled('business_contacts')}">
                                <div class="menu_header">
-                                       <h:outputText value="#{msg.ADMIN_MENU_CONTACT_BUSINESS_TITLE}" />
+                                       <h:outputText value="#{msg.ADMIN_MENU_BUSINESS_BASIC_DATA_TITLE}" />
                                </div>
 
                                <ul>
-                                       <li><h:link title="#{msg.LINK_ADMIN_LIST_CONTACT_BUSINESS_TITLE}" outcome="admin_list_business_data" value="#{msg.LINK_ADMIN_LIST_CONTACT_BUSINESS}" /></li>
-                                       <li><h:link title="#{msg.LINK_ADMIN_EXPORT_CONTACT_BUSINESS_TITLE}" outcome="admin_export_business_data" value="#{msg.LINK_ADMIN_EXPORT_CONTACT_BUSINESS}" /></li>
+                                       <li><h:link title="#{msg.LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE}" outcome="admin_list_business_basic_data" value="#{msg.LINK_ADMIN_LIST_BUSINESS_BASIC_DATA}" /></li>
+                                       <li><h:link title="#{msg.LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE}" outcome="admin_export_business_basic_data" value="#{msg.LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA}" /></li>
                                </ul>
                        </ui:fragment>
 
diff --git a/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl b/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl
new file mode 100644 (file)
index 0000000..fda8dc4
--- /dev/null
@@ -0,0 +1,110 @@
+<?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 class="fieldset" id="business_basic_data">
+                       <legend title="#{msg.ADMIN_BUSINESS_BASIC_DATA_LEGEND_TITLE}">
+                               <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_LEGEND}" />
+                       </legend>
+
+                       <h:panelGroup styleClass="table_row" layout="block">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="companyName" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_NAME}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputText styleClass="input" id="companyName" size="30" maxlength="200" required="true" requiredMessage="#{msg.ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED}" value="#{adminBusinessDataController.companyName}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="companyName" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="table_row" layout="block">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="companyEmailAddress" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_EMAIL_ADDRESS}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputText styleClass="input" id="companyEmailAddress" size="20" maxlength="255" value="#{adminBusinessDataController.companyEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
+                                               <f:validator validatorId="EmailAddressValidator" />
+                                               <f:attribute name="allowEmpty" value="true" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="companyEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" />
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="table_row" layout="block">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="companyComments" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_COMMENTS}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputTextarea styleClass="input" id="companyComments" rows="7" cols="25" value="#{adminBusinessDataController.companyComments}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="table_row" layout="block">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="landLineCountryCode" value="#{msg.ADMIN_BUSINESS_DATA_PHONE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:selectOneMenu styleClass="select right_space" id="landLineCountryCode" value="#{adminBusinessDataController.landLineCountry}">
+                                               <f:converter converterId="CountryConverter" />
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{adminBusinessDataController.landLineAreaCode}">
+                                               <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminBusinessDataController.landLineNumber}">
+                                               <f:validator for="landLineNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </h:panelGroup>
+
+                       <h:panelGroup styleClass="table_row" layout="block">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="faxCountryCode" value="#{msg.ADMIN_BUSINESS_DATA_FAX_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:selectOneMenu styleClass="select right_space" id="faxCountryCode" value="#{adminBusinessDataController.faxCountry}">
+                                               <f:converter converterId="CountryConverter" />
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText styleClass="input right_space" id="faxAreaCode" size="5" maxlength="10" value="#{adminBusinessDataController.faxAreaCode}">
+                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{adminBusinessDataController.faxNumber}">
+                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </h:panelGroup>
+               </fieldset>
+       </div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/business_data/admin_form_business_data.tpl b/web/WEB-INF/templates/admin/business_data/admin_form_business_data.tpl
deleted file mode 100644 (file)
index af9c01b..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?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 class="fieldset" id="business_basic_data">
-                       <legend title="#{msg.ADMIN_CONTACT_BUSINESS_DATA_LEGEND_TITLE}">
-                               <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_DATA_LEGEND}" />
-                       </legend>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="companyName" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_NAME}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:inputText styleClass="input" id="companyName" size="30" maxlength="200" required="true" requiredMessage="#{msg.ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED}" value="#{adminBusinessDataController.companyName}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="error_container" layout="block">
-                               <h:message for="companyName" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="companyEmailAddress" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_EMAIL_ADDRESS}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:inputText styleClass="input" id="companyEmailAddress" size="20" maxlength="255" value="#{adminBusinessDataController.companyEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
-                                               <f:validator validatorId="EmailAddressValidator" />
-                                               <f:attribute name="allowEmpty" value="true" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="error_container" layout="block">
-                               <h:message for="companyEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" />
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="companyComments" value="#{msg.ADMIN_BUSINESS_DATA_COMPANY_COMMENTS}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:inputTextarea styleClass="input" id="companyComments" rows="7" cols="25" value="#{adminBusinessDataController.companyComments}" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="landLineCountryCode" value="#{msg.ADMIN_BUSINESS_DATA_PHONE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select right_space" id="landLineCountryCode" value="#{adminBusinessDataController.landLineCountry}">
-                                               <f:converter converterId="CountryConverter" />
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{adminBusinessDataController.landLineAreaCode}">
-                                               <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminBusinessDataController.landLineNumber}">
-                                               <f:validator for="landLineNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="faxCountryCode" value="#{msg.ADMIN_BUSINESS_DATA_FAX_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select right_space" id="faxCountryCode" value="#{adminBusinessDataController.faxCountry}">
-                                               <f:converter converterId="CountryConverter" />
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText styleClass="input right_space" id="faxAreaCode" size="5" maxlength="10" value="#{adminBusinessDataController.faxAreaCode}">
-                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{adminBusinessDataController.faxNumber}">
-                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-               </fieldset>
-       </div>
-</ui:composition>
diff --git a/web/admin/business_basic_data/admin_business_basic_data_list.xhtml b/web/admin/business_basic_data/admin_business_basic_data_list.xhtml
new file mode 100644 (file)
index 0000000..ab2de3f
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
+                               xmlns="http://www.w3.org/1999/xhtml"
+                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+                               xmlns:h="http://xmlns.jcp.org/jsf/html"
+                               xmlns:f="http://xmlns.jcp.org/jsf/core">
+
+       <ui:define name="admin_title">
+               <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA}" />
+       </ui:define>
+
+       <ui:define name="content_header">
+               <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA}" />
+       </ui:define>
+
+       <ui:define name="content">
+               <ui:fragment rendered="#{businessDataController.allBusinessContacts().isEmpty()}">
+                       <ui:include src="/WEB-INF/templates/messages/message_box.tpl">
+                               <ui:param name="message" value="#{msg.ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY}" />
+                               <ui:param name="styleClass" value="errors" />
+                       </ui:include>
+               </ui:fragment>
+
+               <h:dataTable id="table_list_business_contacts" var="businessContact" value="#{businessDataController.allBusinessContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA}" rendered="#{not businessDataController.allBusinessContacts().isEmpty()}">
+                       <h:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_ID}" />
+                               </f:facet>
+
+                               <h:link outcome="admin_show_business_basic_data" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE}" value="#{businessContact.businessDataId}">
+                                       <f:param name="businessDataId" value="#{businessContact.businessDataId}" />
+                               </h:link>
+                       </h:column>
+
+                       <h:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_OWNER_ID}" />
+                               </f:facet>
+
+                               <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_OWNER_USER_TITLE}" value="#{businessContact.contactCompanyUserOwner.userId}" rendered="#{not empty businessContact.contactCompanyUserOwner}" />
+
+                               <h:link outcome="admin_assign_business_basic_data_owner" title="#{msg.ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER]}" rendered="#{empty businessContact.contactCompanyUserOwner}" />
+                       </h:column>
+
+                       <h:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_COMPANY_NAME}" />
+                               </f:facet>
+
+                               <h:outputText value="#{businessContact.companyName}" />
+                       </h:column>
+
+                       <h:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_CONTACT_PERSON}" />
+                               </f:facet>
+
+                               <h:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{businessContact.companyContact.employeeId}" rendered="#{not empty businessContact.companyContact}" />
+
+                               <h:link outcome="admin_assign_business_basic_data_contact" title="#{msg.ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON]}" rendered="#{empty businessContact.companyContact}" />
+                       </h:column>
+
+                       <h:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_CREATED}" />
+                               </f:facet>
+
+                               <h:outputText id="contactCreated" value="#{businessContact.contactCreated.time}">
+                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
+                               </h:outputText>
+                       </h:column>
+               </h:dataTable>
+
+               <h:form id="form_admin_add_business_basic_data">
+                       <h:panelGroup styleClass="table_medium" layout="block">
+                               <div class="table_header">
+                                       <h:outputText value="#{msg.ADMIN_ADD_BUSINESS_BASIC_DATA_TITLE}" />
+                               </div>
+
+                               <div class="para">
+                                       <h:outputText value="#{msg.ADMIN_ADD_BUSINESS_BASIC_DATA_MINIMUM_DATA}" />
+                               </div>
+
+                               <ui:include src="/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl" />
+
+                               <div class="table_footer">
+                                       <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                       <h:commandButton styleClass="submit" type="submit" id="add_business_basic_data" value="#{msg.BUTTON_ADMIN_CONTINUE_BUSINESS_CONTACT_PERSON}" action="#{adminBusinessDataController.addBusinessBasicData()}" />
+                               </div>
+                       </h:panelGroup>
+               </h:form>
+       </ui:define>
+</ui:composition>
diff --git a/web/admin/business_data/admin_business_data_list.xhtml b/web/admin/business_data/admin_business_data_list.xhtml
deleted file mode 100644 (file)
index 3527e77..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
-                               xmlns="http://www.w3.org/1999/xhtml"
-                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-                               xmlns:h="http://xmlns.jcp.org/jsf/html"
-                               xmlns:f="http://xmlns.jcp.org/jsf/core">
-
-       <ui:define name="admin_title">
-               <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_BUSINESS}" />
-       </ui:define>
-
-       <ui:define name="content_header">
-               <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_BUSINESS}" />
-       </ui:define>
-
-       <ui:define name="content">
-               <ui:fragment rendered="#{businessDataController.allBusinessContacts().isEmpty()}">
-                       <ui:include src="/WEB-INF/templates/messages/message_box.tpl">
-                               <ui:param name="message" value="#{msg.ADMIN_CONTACT_BUSINESS_LIST_EMPTY}" />
-                               <ui:param name="styleClass" value="errors" />
-                       </ui:include>
-               </ui:fragment>
-
-               <h:dataTable id="table_list_business_contacts" var="businessContact" value="#{businessDataController.allBusinessContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT_BUSINESS}" rendered="#{not businessDataController.allBusinessContacts().isEmpty()}">
-                       <h:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_ID}" />
-                               </f:facet>
-
-                               <h:link outcome="admin_show_business_data" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE}" value="#{businessContact.businessDataId}">
-                                       <f:param name="businessDataId" value="#{businessContact.businessDataId}" />
-                               </h:link>
-                       </h:column>
-
-                       <h:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_OWNER_ID}" />
-                               </f:facet>
-
-                               <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_CONTACT_BUSINESS_OWNER_USER_TITLE}" value="#{businessContact.contactCompanyUserOwner.userId}" rendered="#{not empty businessContact.contactCompanyUserOwner}" />
-
-                               <h:link outcome="admin_assign_business_data_owner" title="#{msg.ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_OWNER_USER]}" rendered="#{empty businessContact.contactCompanyUserOwner}" />
-                       </h:column>
-
-                       <h:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_COMPANY_NAME}" />
-                               </f:facet>
-
-                               <h:outputText value="#{businessContact.companyName}" />
-                       </h:column>
-
-                       <h:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_CONTACT_PERSON}" />
-                               </f:facet>
-
-                               <h:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_CONTACT_BUSINESS_CONTACT_PERSON_TITLE}" value="#{businessContact.companyContact.employeeId}" rendered="#{not empty businessContact.companyContact}" />
-
-                               <h:link outcome="admin_assign_business_data_contact" title="#{msg.ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_CONTACT_BUSINESS_CONTACT_PERSON]}" rendered="#{empty businessContact.companyContact}" />
-                       </h:column>
-
-                       <h:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_CREATED}" />
-                               </f:facet>
-
-                               <h:outputText id="contactCreated" value="#{businessContact.contactCreated.time}">
-                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
-                               </h:outputText>
-                       </h:column>
-               </h:dataTable>
-
-               <h:form id="form_admin_add_business_data">
-                       <h:panelGroup styleClass="table_medium" layout="block">
-                               <div class="table_header">
-                                       <h:outputText value="#{msg.ADMIN_ADD_CONTACT_BUSINESS_TITLE}" />
-                               </div>
-
-                               <div class="para">
-                                       <h:outputText value="#{msg.ADMIN_ADD_CONTACT_BUSINESS_MINIMUM_DATA}" />
-                               </div>
-
-                               <ui:include src="/WEB-INF/templates/admin/business_data/admin_form_business_data.tpl" />
-
-                               <div class="table_footer">
-                                       <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                       <h:commandButton styleClass="submit" type="submit" id="add_business_basic_data" value="#{msg.BUTTON_ADMIN_CONTINUE_BUSINESS_CONTACT_PERSON}" action="#{adminBusinessDataController.addBusinessBasicData()}" />
-                               </div>
-                       </h:panelGroup>
-               </h:form>
-       </ui:define>
-</ui:composition>