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=2f6b9f05e6cb1a9a92537fd63b91074bb0aa8354;p=jjobs-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/jjobs/validator/emailaddress/basicdata/JobsBasicDataEmailAddressValidator.java b/src/java/org/mxchange/jjobs/validator/emailaddress/basicdata/JobsBasicDataEmailAddressValidator.java index 0967f56d..e594288c 100644 --- a/src/java/org/mxchange/jjobs/validator/emailaddress/basicdata/JobsBasicDataEmailAddressValidator.java +++ b/src/java/org/mxchange/jjobs/validator/emailaddress/basicdata/JobsBasicDataEmailAddressValidator.java @@ -109,16 +109,10 @@ public class JobsBasicDataEmailAddressValidator extends BaseStringValidator { 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/jjobs/validator/emailaddress/branchoffice/JobsBranchOfficeEmailAddressValidator.java b/src/java/org/mxchange/jjobs/validator/emailaddress/branchoffice/JobsBranchOfficeEmailAddressValidator.java index 79522ecd..53b8dadf 100644 --- a/src/java/org/mxchange/jjobs/validator/emailaddress/branchoffice/JobsBranchOfficeEmailAddressValidator.java +++ b/src/java/org/mxchange/jjobs/validator/emailaddress/branchoffice/JobsBranchOfficeEmailAddressValidator.java @@ -106,16 +106,10 @@ public class JobsBranchOfficeEmailAddressValidator extends BaseStringValidator { 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/jjobs/validator/emailaddress/employee/JobsEmployeeEmailAddressValidator.java b/src/java/org/mxchange/jjobs/validator/emailaddress/employee/JobsEmployeeEmailAddressValidator.java index fbe1ddbc..e2706e25 100644 --- a/src/java/org/mxchange/jjobs/validator/emailaddress/employee/JobsEmployeeEmailAddressValidator.java +++ b/src/java/org/mxchange/jjobs/validator/emailaddress/employee/JobsEmployeeEmailAddressValidator.java @@ -109,16 +109,10 @@ public class JobsEmployeeEmailAddressValidator 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/jjobs/validator/emailaddress/headquarter/JobsHeadquarterEmailAddressValidator.java b/src/java/org/mxchange/jjobs/validator/emailaddress/headquarter/JobsHeadquarterEmailAddressValidator.java index a9c5ef78..aca5ed5e 100644 --- a/src/java/org/mxchange/jjobs/validator/emailaddress/headquarter/JobsHeadquarterEmailAddressValidator.java +++ b/src/java/org/mxchange/jjobs/validator/emailaddress/headquarter/JobsHeadquarterEmailAddressValidator.java @@ -109,16 +109,10 @@ public class JobsHeadquarterEmailAddressValidator extends BaseStringValidator { 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 5b754648..1c615275 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 9c8323cc..60610585 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 @@ - +