From: Roland Häder Date: Thu, 13 Dec 2018 21:25:32 +0000 (+0100) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4aea60c876015dacc188698e13fb61b9bfe31190;p=jfinancials-war.git Please cherry-pick: - created validator for company's short name (BasicData entity) - renamed email-address validator for branch office according to naming-convention - removed "id" attribute from everywhere where it is not explicitly needed - changed some single-line tags to multi-lines for better readability - added companyShortName to view and backing bean - it is now the default instead of companyName which is now fully optional - also added method isCompanyShortNameUsed() to interface Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsAdminBasicDataWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsAdminBasicDataWebRequestBean.java index cb40dce1..74813183 100644 --- a/src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsAdminBasicDataWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsAdminBasicDataWebRequestBean.java @@ -96,6 +96,11 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i */ private String companyName; + /** + * Company short name + */ + private String companyShortName; + /** * Tax number */ @@ -154,17 +159,17 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i *

*/ public void addBusinessBasicData () { - // First, validate all parameter - if (this.getCompanyName() == null) { + // Check if company short name is set + if (this.getCompanyShortName() == null) { // Is null - throw new NullPointerException("this.companyName is null"); //NOI18N - } else if (this.getCompanyName().isEmpty()) { + throw new NullPointerException("this.companyShortName is null"); //NOI18N + } else if (this.getCompanyShortName().isEmpty()) { // Is null - throw new IllegalArgumentException("this.companyName is empty"); //NOI18N + throw new IllegalArgumentException("this.companyShortName is empty"); //NOI18N } // Prepare entity - BasicData basicData = new BusinessBasicData(this.getCompanyName()); + BasicData basicData = new BusinessBasicData(this.getCompanyShortName()); // Set all opther remaining data basicData.setCompanyComments(this.getCompanyComments()); @@ -172,6 +177,7 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i basicData.setCompanyEmailAddress(this.getCompanyEmailAddress()); basicData.setCompanyFounder(this.getCompanyFounder()); basicData.setCompanyHeadquarterData(this.getCompanyHeadQuarter()); + basicData.setCompanyName(this.getCompanyName()); basicData.setCompanyTaxNumber(this.getCompanyTaxNumber()); basicData.setCompanyUserOwner(this.getCompanyUserOwner()); basicData.setCompanyWebsiteUrl(this.getCompanyWebsiteUrl()); @@ -345,6 +351,24 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i this.companyName = companyName; } + /** + * Getter for company short name + *

+ * @return Company short name + */ + public String getCompanyShortName () { + return this.companyShortName; + } + + /** + * Setter for company short name + *

+ * @param companyShortName Company short name + */ + public void setCompanyShortName (final String companyShortName) { + this.companyShortName = companyShortName; + } + /** * Getter for company tax number *

diff --git a/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewBean.java index 5219557a..3bf36ccf 100644 --- a/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewBean.java @@ -109,10 +109,10 @@ public class FinancialsBasicDataListWebViewBean extends BaseFinancialsBean imple } else if (event.getBasicData().getBasicDataId() < 1) { // Throw IAE throw new IllegalArgumentException(MessageFormat.format("event.basicData.basicDataId={0} is invalid", event.getBasicData().getBasicDataId())); //NOI18N - } else if (event.getBasicData().getCompanyName() == null) { + } else if (event.getBasicData().getCompanyShortName() == null) { // Throw NPE again throw new NullPointerException("event.basicData.companyName is null"); //NOI18N - } else if (event.getBasicData().getCompanyName().isEmpty()) { + } else if (event.getBasicData().getCompanyShortName().isEmpty()) { // Throw IAE again throw new IllegalArgumentException("event.basicData.companyName is empty"); //NOI18N } @@ -263,6 +263,34 @@ public class FinancialsBasicDataListWebViewBean extends BaseFinancialsBean imple return isFound; } + @Override + public Boolean isCompanyShortNameUsed (final String companyShortName) { + // Validate parameter + if (null == companyShortName) { + // Throw NPE + throw new NullPointerException("companyShortName is null"); //NOI18N + } else if (companyShortName.isEmpty()) { + // Throw IAE + throw new IllegalArgumentException("companyShortName is empty"); //NOI18N + } + + // Default is not found + boolean isFound = false; + + // Check all entries + for (final BasicData basicData : this.getAllBasicData()) { + // Is same company name? + if (Objects.equals(basicData.getCompanyShortName(), companyShortName)) { + // Found it + isFound = true; + break; + } + } + + // Return flag + return isFound; + } + @Override public Boolean isEmailAddressRegistered (final String emailAddress) { // Validate parameter diff --git a/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewController.java b/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewController.java index c1063717..f27a384f 100644 --- a/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewController.java +++ b/src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewController.java @@ -59,4 +59,13 @@ public interface FinancialsBasicDataListWebViewController extends Serializable { */ Boolean isCompanyNameUsed (final String companyName); + /** + * Checks whether given company short name already exists + *

+ * @param companyShortName Company short name to check + *

+ * @return Whether the company short name exists + */ + Boolean isCompanyShortNameUsed (final String companyShortName); + } diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java index 7c1511fc..78b0fe8c 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java @@ -57,7 +57,7 @@ public class FinancialsBasicDataCompanyNameValidator extends BaseStringValidator final String[] requiredFields = {"companyName"}; //NOI18N // Pre-validation (example: not null, not a string, empty string ...) - super.preValidate(context, component, value, requiredFields, false); + super.preValidate(context, component, value, requiredFields, true); // Convert name to string (now securely checked in BaseStringValidator) final String companyName = (String) value; @@ -81,7 +81,7 @@ public class FinancialsBasicDataCompanyNameValidator extends BaseStringValidator } // Check if name is already used - final Boolean nameExists = BASIC_DATA_LIST_CONTROLLER.isCompanyNameUsed(companyName); + final Boolean nameExists = (companyName != null && BASIC_DATA_LIST_CONTROLLER.isCompanyNameUsed(companyName)); // Is the user id valid? if ((!nameExists) && (checkExisting)) { diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java new file mode 100644 index 00000000..d0646bc5 --- /dev/null +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2017, 2018 Free Software Foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jfinancials.validator.business.basicdata; + +import java.text.MessageFormat; +import javax.enterprise.inject.spi.CDI; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.FacesValidator; +import javax.faces.validator.ValidatorException; +import org.mxchange.jcoreee.validator.string.BaseStringValidator; +import org.mxchange.jfinancials.beans.business.basicdata.list.FinancialsBasicDataListWebViewBean; +import org.mxchange.jfinancials.beans.business.basicdata.list.FinancialsBasicDataListWebViewController; + +/** + * A validator for basic data company short names + *

+ * @author Roland Häder + */ +@FacesValidator (value = "BasicDataCompanyShortNameValidator") +public class FinancialsBasicDataCompanyShortNameValidator extends BaseStringValidator { + + /** + * Business basic data backing bean + */ + private static FinancialsBasicDataListWebViewController BASIC_DATA_LIST_CONTROLLER; + + /** + * Serial number + */ + private static final long serialVersionUID = 57_283_657_476_562L; + + @Override + public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { + // Is the instance there? + if (null == BASIC_DATA_LIST_CONTROLLER) { + // Get bean from CDI directly + BASIC_DATA_LIST_CONTROLLER = CDI.current().select(FinancialsBasicDataListWebViewBean.class).get(); + } + + // All accepted, required fields + final String[] requiredFields = {"companyShortName"}; //NOI18N + + // Pre-validation (example: not null, not a string, empty string ...) + super.preValidate(context, component, value, requiredFields, false); + + // Convert name to string (now securely checked in BaseStringValidator) + final String companyShortName = (String) value; + + // Default is to check on existing names + Boolean checkExisting = Boolean.TRUE; + + // Is attribute "allowEmptyRequiredData" set? + if (component.getAttributes().containsKey("checkExisting")) { //NOI18N + // Get attribute + final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N + + // Make sure, it is Boolean as no String is accepted anymore + if (!(attribute instanceof String)) { + // Not valid attribute, please use "true" or "false" (default) + throw new IllegalArgumentException("checkExisting must be of type String. Please use \"true\" or \"false\" for f:attribute value."); //NOI18N + } + + // Securely cast it + checkExisting = Boolean.parseBoolean((String) attribute); + } + + // Check if name is already used + final Boolean nameExists = BASIC_DATA_LIST_CONTROLLER.isCompanyShortNameUsed(companyShortName); + + // Is the user id valid? + if ((!nameExists) && (checkExisting)) { + // Format message + final String message = MessageFormat.format("No basic data found with comany name {0}.", companyShortName); + + // Name does not exist + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N + } else if ((nameExists) && (!checkExisting)) { + // Format message + final String message = MessageFormat.format("Found basic data with comany name {0}.", companyShortName); + + // Name already exists + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N + } + } + +} diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBranchOfficeEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBranchOfficeEmailAddressValidator.java deleted file mode 100644 index c3964fa6..00000000 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBranchOfficeEmailAddressValidator.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (C) 2016 - 2018 Free Software Foundation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.mxchange.jfinancials.validator.business.basicdata; - -import java.text.MessageFormat; -import java.util.regex.Pattern; -import javax.enterprise.inject.spi.CDI; -import javax.faces.application.FacesMessage; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.FacesValidator; -import javax.faces.validator.ValidatorException; -import org.mxchange.jcoreee.validator.string.BaseStringValidator; -import org.mxchange.jfinancials.beans.business.branchoffice.list.FinancialsBranchOfficeListWebViewBean; -import org.mxchange.jfinancials.beans.business.branchoffice.list.FinancialsBranchOfficeListWebViewController; - -/** - * A validator for branch office email address validation - *

- * @author Roland Häder - */ -@FacesValidator (value = "BranchOfficeEmailAddressValidator") -public class FinancialsBranchOfficeEmailAddressValidator extends BaseStringValidator { - - /** - * Branch office backing bean - */ - private static FinancialsBranchOfficeListWebViewController BRANCH_OFFICE_LIST_CONTROLLER; - - /** - * Email pattern - */ - private static final String EMAIL_REGEX = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; //NOI18N - - /** - * Pattern matcher - */ - private static final Pattern PATTERN_MATCHER = Pattern.compile(FinancialsBranchOfficeEmailAddressValidator.EMAIL_REGEX); - - /** - * Serial number - */ - private static final long serialVersionUID = 187_536_745_607_196L; - - /** - * Whether empty data is allowed - */ - private Boolean allowEmptyRequiredData; - - /** - * Default constructor - */ - public FinancialsBranchOfficeEmailAddressValidator () { - this.allowEmptyRequiredData = Boolean.FALSE; - } - - /** - * Setter for allowEmptyRequiredData flag - *

- * @param allowEmptyRequiredData Whether empty values are allowed - */ - public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) { - this.allowEmptyRequiredData = allowEmptyRequiredData; - } - - @Override - public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // The required field - final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N - - // Pre-validation (example: not null, not a string, empty string ...) - super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData); - - // Is the email address empty and allowed? - if (null == value && this.allowEmptyRequiredData) { - // 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 - final String emailAddress = String.valueOf(value).trim(); - - // Checks if the email address matches a regex ("low-level" check) - // @TODO Should also be done by ) - final boolean matches = PATTERN_MATCHER.matcher(emailAddress).matches(); //NOI18N - - // Is the email address valid? - if (!matches) { - // Generate message - String message = MessageFormat.format("Email address {0} does not match regular expression.", emailAddress); //NOI18N - - // Not matching - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); - } - - // Get client id (aka form id) - final String clientId = component.getClientId(); - - // Is the instance there? - if (null == BRANCH_OFFICE_LIST_CONTROLLER) { - // Get bean from CDI directly - BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(FinancialsBranchOfficeListWebViewBean.class).get(); - } - - // Is it registered? - final Boolean isRegistered = BRANCH_OFFICE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); - - // Is the email address already registered? - if ((!clientId.endsWith("resendEmailAddress")) && (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("resendEmailAddress")) && (!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/business/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java b/src/java/org/mxchange/jfinancials/validator/business/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java new file mode 100644 index 00000000..b8c3b939 --- /dev/null +++ b/src/java/org/mxchange/jfinancials/validator/business/branchoffice/FinancialsBranchOfficeEmailAddressValidator.java @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2016 - 2018 Free Software Foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jfinancials.validator.business.branchoffice; + +import java.text.MessageFormat; +import java.util.regex.Pattern; +import javax.enterprise.inject.spi.CDI; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.FacesValidator; +import javax.faces.validator.ValidatorException; +import org.mxchange.jcoreee.validator.string.BaseStringValidator; +import org.mxchange.jfinancials.beans.business.branchoffice.list.FinancialsBranchOfficeListWebViewBean; +import org.mxchange.jfinancials.beans.business.branchoffice.list.FinancialsBranchOfficeListWebViewController; + +/** + * A validator for branch office email address validation + *

+ * @author Roland Häder + */ +@FacesValidator (value = "BranchOfficeEmailAddressValidator") +public class FinancialsBranchOfficeEmailAddressValidator extends BaseStringValidator { + + /** + * Branch office backing bean + */ + private static FinancialsBranchOfficeListWebViewController BRANCH_OFFICE_LIST_CONTROLLER; + + /** + * Email pattern + */ + private static final String EMAIL_REGEX = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; //NOI18N + + /** + * Pattern matcher + */ + private static final Pattern PATTERN_MATCHER = Pattern.compile(FinancialsBranchOfficeEmailAddressValidator.EMAIL_REGEX); + + /** + * Serial number + */ + private static final long serialVersionUID = 187_536_745_607_196L; + + /** + * Whether empty data is allowed + */ + private Boolean allowEmptyRequiredData; + + /** + * Default constructor + */ + public FinancialsBranchOfficeEmailAddressValidator () { + this.allowEmptyRequiredData = Boolean.FALSE; + } + + /** + * Setter for allowEmptyRequiredData flag + *

+ * @param allowEmptyRequiredData Whether empty values are allowed + */ + public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) { + this.allowEmptyRequiredData = allowEmptyRequiredData; + } + + @Override + public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { + // The required field + final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N + + // Pre-validation (example: not null, not a string, empty string ...) + super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData); + + // Is the email address empty and allowed? + if (null == value && this.allowEmptyRequiredData) { + // 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 + final String emailAddress = String.valueOf(value).trim(); + + // Checks if the email address matches a regex ("low-level" check) + // @TODO Should also be done by ) + final boolean matches = PATTERN_MATCHER.matcher(emailAddress).matches(); //NOI18N + + // Is the email address valid? + if (!matches) { + // Generate message + String message = MessageFormat.format("Email address {0} does not match regular expression.", emailAddress); //NOI18N + + // Not matching + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); + } + + // Get client id (aka form id) + final String clientId = component.getClientId(); + + // Is the instance there? + if (null == BRANCH_OFFICE_LIST_CONTROLLER) { + // Get bean from CDI directly + BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(FinancialsBranchOfficeListWebViewBean.class).get(); + } + + // Is it registered? + final Boolean isRegistered = BRANCH_OFFICE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress); + + // Is the email address already registered? + if ((!clientId.endsWith("resendEmailAddress")) && (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("resendEmailAddress")) && (!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 287389e9..b34609c9 100644 --- a/src/java/org/mxchange/localization/generic_de_DE.properties +++ b/src/java/org/mxchange/localization/generic_de_DE.properties @@ -287,7 +287,7 @@ ADMIN_ENTER_COUNTRY_EXTERNAL_DIAL_PREFIX=Vorwahl f\u00fcr Gespr\u00e4che ausserh ADMIN_ENTER_COUNTRY_PHONE_CODE=Vorwahl f\u00fcr das Land: ADMIN_ENTER_COUNTRY_PHONE_CODE_EXAMPLE=(Beispiel: 49 f\u00fcr Deutschland) BUTTON_ADMIN_ADD_COUNTRY=L\u00e4nderdaten hinzuf\u00fcgen -ID_NUMBER_HEADER=Id-Nummer: +ID_HEADER=Id: ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE=L\u00e4ndercode: ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Vorwahl ausserorts: ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Land: @@ -815,7 +815,7 @@ ENTERED_EMAIL_ADDRESS_IS_INVALID=Die eingegebene Email-Addresse entspricht nicht ADMIN_BASIC_DATA_LEGEND=Basisdaten fuer geschaeftlichen Kontakt: #@TODO Please fix German umlauts! ADMIN_BASIC_DATA_LEGEND_TITLE=Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein. -ADMIN_BASIC_DATA_COMPANY_NAME_REQUIRED=Bitte geben Sie den Firmennamen inklusive Rechtsform ein. +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Bitte geben Sie den kurzen Firmennamen ein. ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Rechtsform (z.B. GmbH): ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Haupt-Email-Adresse: #@TODO Please fix German umlauts! @@ -1222,3 +1222,5 @@ EMPLOYEE_NUMBER_HEADER=Mitarbeiternummer: #@TODO Please fix German umlauts! BACK=Zurueck OPTIONS=Optionen +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Kurzer Firmenname: +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Kurzer Name: diff --git a/src/java/org/mxchange/localization/generic_en_US.properties b/src/java/org/mxchange/localization/generic_en_US.properties index d3ce8c8a..b35ef467 100644 --- a/src/java/org/mxchange/localization/generic_en_US.properties +++ b/src/java/org/mxchange/localization/generic_en_US.properties @@ -265,7 +265,7 @@ ADMIN_ENTER_COUNTRY_EXTERNAL_DIAL_PREFIX=Prefix for calls outside local city: (m ADMIN_ENTER_COUNTRY_PHONE_CODE=Dial prefix for this country: ADMIN_ENTER_COUNTRY_PHONE_CODE_EXAMPLE=(Example: 1 for U.S.A.) BUTTON_ADMIN_ADD_COUNTRY=Add country data -ID_NUMBER_HEADER=Id number: +ID_HEADER=Id: ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE=Country code: ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Dial prefix outside: ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Country: @@ -787,7 +787,7 @@ ADMIN_ADD_BASIC_DATA_MINIMUM_DATA=Please enter at least company name including l ENTERED_EMAIL_ADDRESS_IS_INVALID=Your entered email address is not valid. ADMIN_BASIC_DATA_LEGEND=Basic data for business contact: ADMIN_BASIC_DATA_LEGEND_TITLE=Enter basic data for a business contact. -ADMIN_BASIC_DATA_COMPANY_NAME_REQUIRED=Please enter the company's name including legal status. +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Please enter the company's short name. ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Legal status (e.g. Inc.): ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Main email address: BUTTON_ADMIN_ADD_BASIC_DATA=Add basic data @@ -1107,3 +1107,5 @@ TAX_NUMBER_HEADER=Tax number: EMPLOYEE_NUMBER_HEADER=Employee number: BACK=Back OPTIONS=Options +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Company's short name +ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Short name: diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl index b6a8bdd9..348bf4b6 100644 --- a/web/WEB-INF/templates/admin/admin_menu.tpl +++ b/web/WEB-INF/templates/admin/admin_menu.tpl @@ -54,9 +54,15 @@ - + - + diff --git a/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl b/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl index 33e90389..e4ab9379 100644 --- a/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl +++ b/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl @@ -19,14 +19,25 @@ columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="ui-noborder" > + + + + + + diff --git a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl index d96d9eb3..7e928833 100644 --- a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl @@ -10,7 +10,7 @@ - +

@@ -54,7 +54,6 @@ /> - + diff --git a/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl b/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl index 7d8c62ce..57870cb4 100644 --- a/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl @@ -10,7 +10,7 @@ - +
@@ -54,7 +54,6 @@ /> - +
@@ -55,7 +55,6 @@ /> - + diff --git a/web/admin/admin_logout.xhtml b/web/admin/admin_logout.xhtml index 7f08038e..6fd0bf4f 100644 --- a/web/admin/admin_logout.xhtml +++ b/web/admin/admin_logout.xhtml @@ -17,7 +17,7 @@ - +
@@ -29,7 +29,6 @@ - + - + - + - + + + + + + + @@ -218,7 +224,7 @@ - + @@ -248,7 +254,6 @@ /> - + @@ -219,7 +219,7 @@ - + @@ -331,7 +331,7 @@ - + - + - + @@ -44,7 +44,6 @@ - + @@ -50,7 +50,6 @@ /> - + diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index 7a13e1c0..648aadc6 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -112,7 +112,6 @@ value="#{msg.BUTTON_RESET_FORM}" /> - + @@ -56,7 +56,6 @@ - +
@@ -51,7 +51,6 @@ - +
@@ -50,7 +50,6 @@
- + @@ -88,7 +88,6 @@ /> - + @@ -214,7 +214,6 @@ /> - + @@ -190,7 +190,6 @@ /> - + @@ -44,7 +44,6 @@
- + @@ -46,7 +46,6 @@ /> - + diff --git a/web/admin/headquarter/admin_headquarter_list.xhtml b/web/admin/headquarter/admin_headquarter_list.xhtml index c8ec3456..a6528673 100644 --- a/web/admin/headquarter/admin_headquarter_list.xhtml +++ b/web/admin/headquarter/admin_headquarter_list.xhtml @@ -53,7 +53,7 @@
- + @@ -165,7 +165,6 @@ />
- + - +
- +
@@ -42,7 +46,6 @@
- +
@@ -44,7 +44,6 @@ /> - + diff --git a/web/admin/mobile/admin_mobile_delete.xhtml b/web/admin/mobile/admin_mobile_delete.xhtml index 79d6a378..557e17c5 100644 --- a/web/admin/mobile/admin_mobile_delete.xhtml +++ b/web/admin/mobile/admin_mobile_delete.xhtml @@ -27,7 +27,7 @@ - +
@@ -42,7 +42,6 @@
- +
@@ -44,7 +44,6 @@ /> - + diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index baf809ba..b4ab0f20 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -51,7 +51,7 @@ - + @@ -115,7 +115,6 @@ /> - + @@ -144,7 +144,6 @@ /> - +
@@ -53,7 +53,6 @@ - +
@@ -46,7 +46,6 @@ /> - + diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index f5a1b057..41ec650e 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -210,7 +210,6 @@ /> - +
@@ -83,7 +83,6 @@ /> - +
@@ -51,7 +51,6 @@ /> - +
@@ -107,7 +107,6 @@ />
- +
@@ -65,7 +65,6 @@ /> - +
@@ -60,7 +60,6 @@ /> - +
@@ -27,7 +27,6 @@
- +
@@ -54,7 +54,6 @@ /> - +
@@ -78,7 +78,6 @@ />
- + @@ -49,8 +49,6 @@ />