]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 31 Aug 2016 15:54:08 +0000 (17:54 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 31 Aug 2016 20:01:06 +0000 (22:01 +0200)
- use single h:message for each field
- fixed "for" attributes
- used h:outputText

Signed-off-by: Roland Häder <roland@mxchange.org>
web/WEB-INF/templates/admin/country/admin_form_country_data.tpl

index 2bc243cc35f568bfcda8851f8c3ef69320cb0ae6..521946feb15e3d244e45aacc255e9a6ed9acc748 100644 (file)
@@ -6,7 +6,7 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
        <div class="para notice">
-               #{msg.ADMIN_COUNTRY_DATA_MINIMUM_NOTICE}
+               <h:outputText value="#{msg.ADMIN_COUNTRY_DATA_MINIMUM_NOTICE}" />
        </div>
 
        <div class="para">
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:inputText styleClass="input" id="countryAbroadDialPrefix" size="2" maxlength="10" value="#{adminCountryController.countryAbroadDialPrefix}" required="true">
-                                               <f:validateLongRange for="countryAbroadDialPrefix" minimum="0" maximum="99" />
+                                       <h:inputText styleClass="input" id="countryAbroadDialPrefix" size="2" maxlength="10" value="#{adminCountryController.countryAbroadDialPrefix}" required="true" requiredMessage="#{msg.ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED}">
+                                               <f:validator validatorId="AbroadDialValidator" />
                                        </h:inputText>
                                </div>
 
                                <div class="clear"></div>
                        </div>
 
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryAbroadDialPrefix" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="countryCode" value="#{msg.ADMIN_ENTER_COUNTRY_CODE}" />
                                <div class="clear"></div>
                        </div>
 
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryCode" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="countryI18nKey" value="#{msg.ADMIN_ENTER_COUNTRY_I18N_KEY}" />
                                <div class="clear"></div>
                        </div>
 
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryI18nKey" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="countryIsLocalPrefixRequired" value="#{msg.ADMIN_SELECT_COUNTRY_IS_EXTERNAL_DIAL_PREFIX_REQUIRED}" />
                                <div class="clear"></div>
                        </div>
 
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryIsLocalPrefixRequired" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="countryExternalDialPrefix" value="#{msg.ADMIN_ENTER_COUNTRY_EXTERNAL_DIAL_PREFIX}" />
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:inputText styleClass="input" id="countryExternalDialPrefix" size="2" maxlength="10" value="#{adminCountryController.countryExternalDialPrefix}" required="true">
-                                               <f:validateLongRange for="countryAbroadDialPrefix" minimum="0" maximum="99" />
+                                       <h:inputText styleClass="input" id="countryExternalDialPrefix" size="2" maxlength="10" value="#{adminCountryController.countryExternalDialPrefix}" required="true" requiredMessage="#{msg.ADMIN_COUNTRY_EXTERNAL_DIAL_PREFIX_REQUIRED}">
+                                               <f:validateLongRange for="countryExternalDialPrefix" minimum="0" maximum="99" />
                                        </h:inputText>
                                </div>
 
                                <div class="clear"></div>
                        </div>
 
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryAbroadDialPrefix" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="countryPhoneCode" value="#{msg.ADMIN_ENTER_COUNTRY_PHONE_CODE}" />
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:inputText styleClass="input" id="countryPhoneCode" size="2" maxlength="6" value="#{adminCountryController.countryPhoneCode}" required="true">
-                                               <f:validateLongRange for="countryAbroadDialPrefix" minimum="0" maximum="99" />
+                                       <h:inputText styleClass="input" id="countryPhoneCode" size="2" maxlength="6" value="#{adminCountryController.countryPhoneCode}" required="true" requiredMessage="#{msg.ADMIN_COUNTRY_PHONE_CODE_REQUIRED}">
+                                               <f:validateLongRange for="countryPhoneCode" minimum="0" maximum="99" />
                                        </h:inputText>
 
                                        <h:outputText styleClass="small notice" value="#{msg.ADMIN_ENTER_COUNTRY_PHONE_CODE_EXAMPLE}" />
 
                                <div class="clear"></div>
                        </div>
+
+                       <h:panelGroup styleClass="error_container" layout="block">
+                               <h:message for="countryPhoneCode" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
                </fieldset>
        </div>
 </ui:composition>