]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
Please cherry-pick:
[jjobs-war.git] / web / WEB-INF / templates / guest / user / register / guest_form_register_page1.tpl
index 7ccf32d9dd677b30fca62304276436b8874ea594..df920e5064711a407c24bf17825927c82b0acaaf 100644 (file)
@@ -5,10 +5,10 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:form id="form_register_page1">
+       <h:form id="form_register_page1" rendered="#{featureController.isFeatureEnabled('user_registration')}">
                <h:panelGroup styleClass="table_medium" layout="block">
                        <div class="table_header">
-                               #{msg.GUEST_REGISTRATION_PAGE1_TITLE}
+                               <h:outputText value="#{msg.GUEST_REGISTRATION_PAGE1_TITLE}" />
                        </div>
 
                        <div class="para">
                                        </legend>
 
                                        <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
-                                               <div class="table_row">
+                                               <h:panelGroup styleClass="table_row" layout="block">
                                                        <div class="table_left_medium">
                                                                <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
                                                        </div>
 
                                                        <div class="table_right_medium">
-                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" requiredMessage="#{msg.GUEST_REGISTRATION_USER_NAME_NOT_ENTERED}" />
                                                        </div>
 
                                                        <div class="clear"></div>
-                                               </div>
+                                               </h:panelGroup>
+
+                                               <h:panelGroup styleClass="error_container" layout="block">
+                                                       <h:message for="userName" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                                               </h:panelGroup>
                                        </ui:fragment>
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
                                        <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <div class="para"></div>
 
-                                               <div class="table_row">
+                                               <h:panelGroup styleClass="table_row" layout="block">
                                                        <div class="table_left_medium">
                                                                <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
                                                        </div>
 
                                                        <div class="table_right_medium">
-                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" />
                                                        </div>
 
                                                        <div class="clear"></div>
-                                               </div>
+                                               </h:panelGroup>
 
-                                               <div class="table_row">
+                                               <h:panelGroup styleClass="error_container" layout="block">
+                                                       <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                                               </h:panelGroup>
+
+                                               <h:panelGroup styleClass="table_row" layout="block">
                                                        <div class="table_left_medium">
                                                                <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
                                                        </div>
 
                                                        <div class="table_right_medium">
-                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" />
                                                        </div>
 
                                                        <div class="clear"></div>
-                                               </div>
+                                               </h:panelGroup>
+
+                                               <h:panelGroup styleClass="error_container" layout="block">
+                                                       <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                                               </h:panelGroup>
 
                                                <div class="para notice">
-                                                       <h:outputText value="#{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}" />
+                                                       <ul>
+                                                               <li><h:outputText value="#{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}" /></li>
+                                                               <ui:fragment rendered="#{featureController.isFeatureEnabled('allow_user_registration_empty_password')}">
+                                                                       <li><h:outputText value="#{msg.GUEST_REGISTRATION_USER_PASSWORDS_EMPTY_ALLOWED}" /></li>
+                                                               </ui:fragment>
+                                                               <ui:fragment rendered="#{not featureController.isFeatureEnabled('allow_user_registration_empty_password')}">
+                                                                       <li><h:outputText value="#{msg.GUEST_REGISTRATION_USER_PASSWORDS_EMPTY_NOT_ALLOWED}" /></li>
+                                                               </ui:fragment>
+                                                       </ul>
                                                </div>
                                        </ui:fragment>
                                </fieldset>
@@ -71,7 +91,7 @@
 
                        <div class="table_footer">
                                <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                               <h:commandButton styleClass="submit" type="submit" id="continueRegisterPage1" value="#{msg.BUTTON_CONTINUE_REGISTER_PAGE2}" action="#{registerController.doRegisterMultiPage1()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="continueRegisterPage1" value="#{msg.BUTTON_CONTINUE_REGISTER_PAGE2}" action="#{userRegistrationController.doRegisterMultiPage1()}" />
                        </div>
                </h:panelGroup>
        </h:form>