From: Roland Häder Date: Sat, 19 Aug 2017 16:24:32 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=114f277ffebbc035eb8714d072f799a3ccc0663f;p=pizzaservice-war.git Please cherry-pick: - 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 --- diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 02252c95..6ae0658d 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -792,50 +792,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): diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 8bd44a6e..0e52e9aa 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -784,36 +784,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.): diff --git a/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java b/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java index a16c55cb..ed7e4794 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java @@ -76,16 +76,19 @@ public class PizzaEmailAddressValidator extends BaseStringValidator implements V // 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 ) boolean matches = EMAIL_PATTERN.matcher(emailAddress).matches(); //NOI18N diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 4947b98d..2101bb24 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -109,12 +109,12 @@ /admin/contact/admin_contact_export.xhtml - admin_list_business_data - /admin/business_data/admin_business_data_list.xhtml + admin_list_business_basic_data + /admin/business_basic_data/admin_business_basic_data_list.xhtml - admin_export_business_data - /admin/business_data/admin_business_data_export.xhtml + admin_export_business_basic_data + /admin/business_basic_data/admin_business_basic_data_export.xhtml admin_list_user diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl index 8d041241..35c866e0 100644 --- a/web/WEB-INF/templates/admin/admin_menu.tpl +++ b/web/WEB-INF/templates/admin/admin_menu.tpl @@ -45,12 +45,12 @@
    -
  • -
  • +
  • +
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 index 00000000..fda8dc4f --- /dev/null +++ b/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl @@ -0,0 +1,110 @@ + + + +
+
+ + + + + +
+ +
+ +
+ +
+ +
+
+ + + + + + +
+ +
+ +
+ + + + +
+ +
+
+ + + + + + +
+ +
+ +
+ +
+ +
+
+ + +
+ +
+ +
+ + + + + + + + + + + + + +
+ +
+
+ + +
+ +
+ +
+ + + + + + + + + + + + + +
+ +
+
+
+
+
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 index af9c01b8..00000000 --- a/web/WEB-INF/templates/admin/business_data/admin_form_business_data.tpl +++ /dev/null @@ -1,110 +0,0 @@ - - - -
-
- - - - - -
- -
- -
- -
- -
-
- - - - - - -
- -
- -
- - - - -
- -
-
- - - - - - -
- -
- -
- -
- -
-
- - -
- -
- -
- - - - - - - - - - - - - -
- -
-
- - -
- -
- -
- - - - - - - - - - - - - -
- -
-
-
-
-
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 index 00000000..ab2de3f3 --- /dev/null +++ b/web/admin/business_basic_data/admin_business_basic_data_list.xhtml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+
+
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 index 3527e775..00000000 --- a/web/admin/business_data/admin_business_data_list.xhtml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- - - - -
-
-
-