From: Roland Häder Date: Sun, 2 Oct 2022 17:42:56 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5de1ad11bfaa61b716875e50b0a4bcdde19e05e0;p=jfinancials-war.git Please cherry-pick: - these checks on if registered or not or provided or not makes here no sense and has caused forms not accepting email addresses - renamed template - added country Hungary --- diff --git a/src/java/org/mxchange/jfinancials/validator/emailaddress/basicdata/FinancialsBasicDataEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/emailaddress/basicdata/FinancialsBasicDataEmailAddressValidator.java index 05d73f05..a7957fe4 100644 --- a/src/java/org/mxchange/jfinancials/validator/emailaddress/basicdata/FinancialsBasicDataEmailAddressValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/emailaddress/basicdata/FinancialsBasicDataEmailAddressValidator.java @@ -109,16 +109,10 @@ public class FinancialsBasicDataEmailAddressValidator extends BaseStringValidato final Boolean isRegistered = BASIC_DATA_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); // Is the email address already registered? - if ((!clientId.endsWith("companyEmailAddress")) && (isRegistered)) { //NOI18N + if ((clientId.endsWith("companyEmailAddress")) && isRegistered) { //NOI18N // Generate message final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N - // No, then abort here - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); - } else if ((clientId.endsWith("companyEmailAddress")) && (!isRegistered)) { //NOI18N - // Generate message - final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N - // No, then abort here throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); } diff --git a/src/java/org/mxchange/jfinancials/validator/emailaddress/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/emailaddress/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java index deb6e043..bb7cfa75 100644 --- a/src/java/org/mxchange/jfinancials/validator/emailaddress/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/emailaddress/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java @@ -106,16 +106,10 @@ public class FinancialsBranchOfficeEmailAddressValidator extends BaseStringValid final Boolean isRegistered = BRANCH_OFFICE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); // Is the email address already registered? - if ((!clientId.endsWith("branchEmailAddress")) && (isRegistered)) { //NOI18N + if ((clientId.endsWith("branchEmailAddress")) && isRegistered) { //NOI18N // Generate message final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N - // No, then abort here - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); - } else if ((clientId.endsWith("branchEmailAddress")) && (!isRegistered)) { //NOI18N - // Generate message - final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N - // No, then abort here throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); } diff --git a/src/java/org/mxchange/jfinancials/validator/emailaddress/employee/FinancialsEmployeeEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/emailaddress/employee/FinancialsEmployeeEmailAddressValidator.java index 279d2d51..940c6e1e 100644 --- a/src/java/org/mxchange/jfinancials/validator/emailaddress/employee/FinancialsEmployeeEmailAddressValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/emailaddress/employee/FinancialsEmployeeEmailAddressValidator.java @@ -109,16 +109,10 @@ public class FinancialsEmployeeEmailAddressValidator extends BaseStringValidator final Boolean isRegistered = EMPLOYEE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); // Is the email address already registered? - if ((!clientId.endsWith("employeeEmailAddress")) && (isRegistered)) { //NOI18N + if ((clientId.endsWith("employeeEmailAddress")) && isRegistered) { //NOI18N // Generate message final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N - // No, then abort here - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); - } else if ((clientId.endsWith("employeeEmailAddress")) && (!isRegistered)) { //NOI18N - // Generate message - final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N - // No, then abort here throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); } diff --git a/src/java/org/mxchange/jfinancials/validator/emailaddress/headquarter/FinancialsHeadquarterEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/emailaddress/headquarter/FinancialsHeadquarterEmailAddressValidator.java index bb84fe1f..a9737e73 100644 --- a/src/java/org/mxchange/jfinancials/validator/emailaddress/headquarter/FinancialsHeadquarterEmailAddressValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/emailaddress/headquarter/FinancialsHeadquarterEmailAddressValidator.java @@ -109,16 +109,10 @@ public class FinancialsHeadquarterEmailAddressValidator extends BaseStringValida final Boolean isRegistered = HEADQUARTER_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); // Is the email address already registered? - if ((!clientId.endsWith("headquarterEmailAddress")) && (isRegistered)) { //NOI18N + if ((clientId.endsWith("headquarterEmailAddress")) && isRegistered) { //NOI18N // Generate message final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N - // No, then abort here - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); - } else if ((clientId.endsWith("headquarterEmailAddress")) && (!isRegistered)) { //NOI18N - // Generate message - final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N - // No, then abort here throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); } diff --git a/src/java/org/mxchange/localization/generic_de_DE.properties b/src/java/org/mxchange/localization/generic_de_DE.properties index feb1db29..222c8472 100644 --- a/src/java/org/mxchange/localization/generic_de_DE.properties +++ b/src/java/org/mxchange/localization/generic_de_DE.properties @@ -132,6 +132,7 @@ COUNTRY_DANMARK=D\u00e4nemark COUNTRY_FRANCE=Frankreich COUNTRY_GERMANY=Deutschland COUNTRY_GREECE=Griechenland +COUNTRY_HUNGARY=Ungarn COUNTRY_ITALIA=Italien COUNTRY_NETHERLANDS=Niederlande COUNTRY_PHILIPPINES=Philippinen diff --git a/src/java/org/mxchange/localization/generic_en_US.properties b/src/java/org/mxchange/localization/generic_en_US.properties index 697c1190..e0f4db05 100644 --- a/src/java/org/mxchange/localization/generic_en_US.properties +++ b/src/java/org/mxchange/localization/generic_en_US.properties @@ -132,6 +132,7 @@ COUNTRY_DANMARK=Danmark COUNTRY_FRANCE=France COUNTRY_GERMANY=Germany COUNTRY_GREECE=Greece +COUNTRY_HUNGARY=Hungary COUNTRY_ITALIA=Italia COUNTRY_NETHERLANDS=Netherlands COUNTRY_PHILIPPINES=Philippines diff --git a/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl b/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl deleted file mode 100644 index 61ddb0b1..00000000 --- a/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter_data.tpl b/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter_data.tpl new file mode 100644 index 00000000..61ddb0b1 --- /dev/null +++ b/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter_data.tpl @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/admin/headquarter/admin_headquarter_list.xhtml b/web/admin/headquarter/admin_headquarter_list.xhtml index c19e0f27..28cd7296 100644 --- a/web/admin/headquarter/admin_headquarter_list.xhtml +++ b/web/admin/headquarter/admin_headquarter_list.xhtml @@ -310,7 +310,7 @@ - +