]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 29 Aug 2016 15:01:32 +0000 (17:01 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 29 Aug 2016 17:34:15 +0000 (19:34 +0200)
- rewrote template to have a targetController parameter (must be set)

web/WEB-INF/templates/login/user/user_enter_current_password.tpl
web/user/login_change_password.xhtml
web/user/login_change_personal_data.xhtml

index cbe9d2d4135120397a7be04fb53113b919a0b80f..0a6ab254685401dc84c618629fad26535d082a5d 100644 (file)
@@ -5,29 +5,38 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <div class="para">
-               <fieldset class="fieldset" id="current_password">
-                       <legend title="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE}">
-                               <h:outputText value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND}" />
-                       </legend>
+       <ui:fragment rendered="#{empty targetController}">
+               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                       <ui:param name="message" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" />
+                       <ui:param name="styleClass" value="errors" />
+               </ui:include>
+       </ui:fragment>
 
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="currentPassword" value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM}" />
-                               </div>
+       <ui:fragment rendered="#{not empty targetController}">
+               <div class="para">
+                       <fieldset class="fieldset" id="current_password">
+                               <legend title="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE}">
+                                       <h:outputText value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND}" />
+                               </legend>
 
-                               <div class="table_right">
-                                       <h:inputSecret styleClass="input" id="currentPassword" size="10" maxlength="255" value="#{userLoginController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_USER_CURRENT_PASSWORD_MISMATCHING}">
-                                               <!-- <f:validator for="currentPassword" validatorId="RecruiterUserPasswordValidator" /> //-->
-                                       </h:inputSecret>
-                               </div>
+                               <div class="table_row">
+                                       <div class="table_left">
+                                               <h:outputLabel for="currentPassword" value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM}" />
+                                       </div>
 
-                               <div class="clear"></div>
+                                       <div class="table_right">
+                                               <h:inputSecret styleClass="input" id="currentPassword" size="10" maxlength="255" value="#{targetController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_USER_CURRENT_PASSWORD_MISMATCHING}">
+                                                       <!-- <f:validator for="currentPassword" validatorId="RecruiterUserPasswordValidator" /> //-->
+                                               </h:inputSecret>
+                                       </div>
 
-                               <h:panelGroup styleClass="error_container" layout="block">
-                                       <h:message for="currentPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                               </h:panelGroup>
-                       </div>
-               </fieldset>
-       </div>
+                                       <div class="clear"></div>
+
+                                       <h:panelGroup styleClass="error_container" layout="block">
+                                               <h:message for="currentPassword" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                                       </h:panelGroup>
+                               </div>
+                       </fieldset>
+               </div>
+       </ui:fragment>
 </ui:composition>
index dc647b75027143a7434c02c5860ab863723a1f36..ea8d8f73a5907dc2c6d02943325e763c3b840a06 100644 (file)
@@ -70,7 +70,9 @@
                                                        </fieldset>
                                                </div>
 
-                                               <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
+                                               <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl">
+                                                       <ui:param name="targetController" value="#{userPasswordController}" />
+                                               </ui:include>
 
                                                <div class="table_footer">
                                                        <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
index f8ec40bb9cbc5f31431dce3a4dedde99a805c2d4..6e338d095f223717cc605efbc028b07a74a8b890 100644 (file)
@@ -25,7 +25,9 @@
                                <h:form id="form_login_change_personal">
                                        <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
 
-                                       <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
+                                       <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl">
+                                               <ui:param name="targetController" value="#{userLoginController}" />
+                                       </ui:include>
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />