xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:panelGroup styleClass="para" layout="block">
- <fieldset class="fieldset" id="branch_office">
+ <fieldset class="fieldset" id="admin_branch_office_basic">
<legend title="#{msg.ADMIN_BRANCH_OFFICE_LEGEND_TITLE}">
<h:outputText value="#{msg.ADMIN_BRANCH_OFFICE_LEGEND}" />
</legend>
</div>
<div class="table-right-medium">
- <h:selectOneMenu styleClass="select" id="branchCompany" value="#{adminBranchOfficeController.branchCompany}">
+ <h:selectOneMenu styleClass="select" id="branchCompany" value="#{adminBranchOfficeController.branchCompany}" required="true" requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_COMPANY_REQUIRED}">
<f:converter converterId="BasicCompanyDataConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" itemDisabled="true" />
<f:selectItems value="#{companyDataController.allCompanyBasicData()}" var="companyData" itemValue="#{companyData}" itemLabel="#{companyData.companyName}" />
</h:selectOneMenu>
</div>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchStreet" value="#{msg.ADMIN_DATA_STREET_NAME}" />
+ <h:outputLabel for="branchEmailAddress" value="#{msg.ADMIN_ENTER_BRANCH_OFFICE_EMAIL_ADDRESS}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchStreet" size="20" maxlength="255" value="#{adminBranchOfficeController.branchStreet}" />
+ <h:inputText styleClass="input" id="branchEmailAddress" size="20" maxlength="255" value="#{adminBranchOfficeController.branchEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
+ <f:validator validatorId="EmailAddressValidator" />
+ <f:attribute name="allowEmptyValue" value="true" />
+ </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchStreet" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchEmailAddress" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchHouseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
+ <h:outputLabel for="landLineCountry" value="#{msg.ADMIN_ENTER_BRANCH_OFFICE_PHONE_NUMBER}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchHouseNumber" size="20" maxlength="255" value="#{adminBranchOfficeController.branchHouseNumber}" />
+ <h:selectOneMenu styleClass="select divider-right" id="landLineCountry" value="#{adminBranchOfficeController.landLineCountry}">
+ <f:converter converterId="CountryConverter" />
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+ <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
+ </h:selectOneMenu>
+
+ <h:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.landLineAreaCode}">
+ <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" />
+ </h:inputText>
+
+ <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminBranchOfficeController.landLineNumber}">
+ <f:validator for="landLineNumber" validatorId="PhoneNumberValidator" />
+ </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchHouseNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="landLineCountry" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
- <h:panelGroup styleClass="table-row" layout="block">
- <div class="table-left-medium">
- <h:outputLabel for="branchStore" value="#{msg.ADMIN_DATA_STORE}" />
- </div>
-
- <div class="table-right-medium">
- <h:inputText styleClass="input" id="branchStore" size="20" maxlength="255" value="#{adminBranchOfficeController.branchStore}" />
- </div>
+ <h:panelGroup styleClass="error_container" layout="block">
+ <h:message for="landLineAreaCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchStore" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="landLineNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchSuiteNumber" value="#{msg.ADMIN_DATA_SUITE_NUMBER}" />
+ <h:outputLabel for="faxCountry" value="#{msg.ADMIN_ENTER_BRANCH_OFFICE_FAX_NUMBER}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchSuiteNumber" size="20" maxlength="255" value="#{adminBranchOfficeController.branchSuiteNumber}" />
+ <h:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{adminBranchOfficeController.faxCountry}">
+ <f:converter converterId="CountryConverter" />
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+ <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
+ </h:selectOneMenu>
+
+ <h:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.faxAreaCode}">
+ <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
+ </h:inputText>
+
+ <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{adminBranchOfficeController.faxNumber}">
+ <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
+ </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchSuiteNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="faxCountry" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
+ <h:panelGroup styleClass="error_container" layout="block">
+ <h:message for="faxAreaCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ </h:panelGroup>
+
+ <h:panelGroup styleClass="error_container" layout="block">
+ <h:message for="faxNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ </h:panelGroup>
+ </fieldset>
+
+ <fieldset class="fieldset" id="admin_branch_office_address">
+ <legend title="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_LEGEND_TITLE}">
+ <h:outputText value="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_LEGEND}" />
+ </legend>
+
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchZipCode" value="#{msg.ADMIN_DATA_ZIP_CODE}" />
+ <h:outputLabel for="branchStreet" value="#{msg.ADMIN_DATA_STREET_NAME}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchZipCode" size="20" maxlength="255" value="#{adminBranchOfficeController.branchZipCode}" />
+ <h:inputText styleClass="input" id="branchStreet" size="20" maxlength="255" value="#{adminBranchOfficeController.branchStreet}" required="true" requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_STREET_NAME_REQUIRED}" />
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchZipCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchStreet" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchCity" value="#{msg.ADMIN_DATA_CITY}" />
+ <h:outputLabel for="branchHouseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchCity" size="20" maxlength="255" value="#{adminBranchOfficeController.branchCity}" />
+ <h:inputText styleClass="input" id="branchHouseNumber" size="3" maxlength="5" value="#{adminBranchOfficeController.branchHouseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}" required="true" requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_HOUSE_NUMBER_REQUIRED}">
+ <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
+ </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchCity" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchHouseNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchCountry" value="#{msg.ADMIN_SELECT_COUNTRY}" />
+ <h:outputLabel for="branchStore" value="#{msg.ADMIN_DATA_STORE}" />
</div>
<div class="table-right-medium">
- <h:selectOneMenu styleClass="select" id="branchCountry" value="#{adminBranchOfficeController.branchCountry}">
- <f:converter converterId="CountryConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" />
- </h:selectOneMenu>
+ <h:inputText styleClass="input" id="branchStore" size="3" maxlength="5" value="#{adminBranchOfficeController.branchStore}" validatorMessage="#{msg.ENTERED_STORE_INVALID}">
+ <f:validateLongRange for="houseNumber" minimum="-5" maximum="200" />
+ </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchCountry" errorClass="alert-danger" fatalClass="alert-danger" warnClass="alert-warning" />
+ <h:message for="branchStore" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="branchEmailAddress" value="#{msg.ADMIN_BRANCH_OFFICE_EMAIL_ADDRESS}" />
+ <h:outputLabel for="branchSuiteNumber" value="#{msg.ADMIN_DATA_SUITE_NUMBER}" />
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="branchEmailAddress" size="20" maxlength="255" value="#{adminBranchOfficeController.branchEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
- <f:validator validatorId="EmailAddressValidator" />
- <f:attribute name="allowEmptyValue" value="true" />
+ <h:inputText styleClass="input" id="branchSuiteNumber" size="3" maxlength="5" value="#{adminBranchOfficeController.branchSuiteNumber}" validatorMessage="#{msg.ENTERED_SUITE_NUMBER_INVALID}">
+ <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
</h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="branchEmailAddress" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchSuiteNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="landLineCountry" value="#{msg.ADMIN_BRANCH_OFFICE_PHONE_NUMBER}" />
+ <h:outputLabel for="branchZipCode" value="#{msg.ADMIN_DATA_ZIP_CODE}" />
</div>
<div class="table-right-medium">
- <h:selectOneMenu styleClass="select divider-right" id="landLineCountry" value="#{adminBranchOfficeController.landLineCountry}">
- <f:converter converterId="CountryConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
- </h:selectOneMenu>
-
- <h:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.landLineAreaCode}">
- <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" />
- </h:inputText>
-
- <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminBranchOfficeController.landLineNumber}">
- <f:validator for="landLineNumber" validatorId="PhoneNumberValidator" />
- </h:inputText>
+ <h:inputText styleClass="input" id="branchZipCode" size="20" maxlength="255" value="#{adminBranchOfficeController.branchZipCode}" />
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="landLineCountry" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchZipCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
- <h:panelGroup styleClass="error_container" layout="block">
- <h:message for="landLineAreaCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:panelGroup styleClass="table-row" layout="block">
+ <div class="table-left-medium">
+ <h:outputLabel for="branchCity" value="#{msg.ADMIN_DATA_CITY}" />
+ </div>
+
+ <div class="table-right-medium">
+ <h:inputText styleClass="input" id="branchCity" size="20" maxlength="255" value="#{adminBranchOfficeController.branchCity}" />
+ </div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="landLineNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchCity" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
</h:panelGroup>
<h:panelGroup styleClass="table-row" layout="block">
<div class="table-left-medium">
- <h:outputLabel for="faxCountry" value="#{msg.ADMIN_BRANCH_OFFICE_FAX_NUMBER}" />
+ <h:outputLabel for="branchCountry" value="#{msg.ADMIN_SELECT_COUNTRY}" />
</div>
<div class="table-right-medium">
- <h:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{adminBranchOfficeController.faxCountry}">
+ <h:selectOneMenu styleClass="select" id="branchCountry" value="#{adminBranchOfficeController.branchCountry}">
<f:converter converterId="CountryConverter" />
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
+ <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" />
</h:selectOneMenu>
-
- <h:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.faxAreaCode}">
- <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
- </h:inputText>
-
- <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{adminBranchOfficeController.faxNumber}">
- <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
- </h:inputText>
</div>
</h:panelGroup>
<h:panelGroup styleClass="error_container" layout="block">
- <h:message for="faxCountry" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
- </h:panelGroup>
-
- <h:panelGroup styleClass="error_container" layout="block">
- <h:message for="faxAreaCode" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
- </h:panelGroup>
-
- <h:panelGroup styleClass="error_container" layout="block">
- <h:message for="faxNumber" errorClass="alert-danger" warnClass="alert-warning" fatalClass="alert-danger" />
+ <h:message for="branchCountry" errorClass="alert-danger" fatalClass="alert-danger" warnClass="alert-warning" />
</h:panelGroup>
</fieldset>
</h:panelGroup>