You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2019/09/21 19:12:24 UTC

svn commit: r1867296 [2/2] - in /ofbiz/ofbiz-framework/branches/release18.12: ./ applications/securityext/config/ applications/securityext/src/main/java/org/apache/ofbiz/securityext/login/ applications/securityext/template/email/ framework/common/confi...

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml Sat Sep 21 19:12:23 2019
@@ -625,56 +625,6 @@ under the License.
         </section>
     </screen>
 
-    <screen name="forgotPassword_step1">
-        <section>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>
-                            <actions>
-                                <set field="forgotPasswordTemplateLocation" from-field="layoutSettings.VT_FGPWD_TMPLT_LOC" default-value="component://common-theme/template/ForgotPassword.ftl"/>
-                            </actions>
-                            <widgets />
-                        </section>
-                        <platform-specific>
-                            <html><html-template location="${forgotPasswordTemplateLocation}"/></html>
-                        </platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-
-    <screen name="forgotPassword_step2">
-        <section>
-            <actions>
-                <set field="userLoginId" from-field="parameters.USERNAME"/>
-                <entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
-                    <field-map field-name="userLoginId" />
-                </entity-and>
-                <set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
-                <entity-one entity-name="Enumeration" value-field="securityQuestion">
-                    <field-map field-name="enumId" from-field="questionEnumId"/>
-                </entity-one>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>
-                            <actions>
-                                <set field="getSecurityQuestionTemplateLocation" from-field="layoutSettings.VT_GSQUE_TMPLT_LOC" default-value="component://common-theme/template/GetSecurityQuestion.ftl"/>
-                            </actions>
-                            <widgets />
-                        </section>
-                        <platform-specific>
-                            <html><html-template location="${getSecurityQuestionTemplateLocation}"/></html>
-                        </platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-
     <screen name="forgotPassword">
         <section>
             <widgets>
@@ -683,12 +633,30 @@ under the License.
                         <section>
                             <actions>
                                 <set field="forgotPasswordTemplateLocation" from-field="layoutSettings.VT_FGPWD_TMPLT_LOC" default-value="component://common-theme/template/ForgotPassword.ftl"/>
+                                <set field="forgotPasswordTarget" value="${groovy: 'forgotPassword' + (parameters.token?'Reset':'')}"/>
                             </actions>
-                            <widgets />
-                         </section>
-                         <platform-specific>
-                            <html><html-template location="${forgotPasswordTemplateLocation}"/></html>
-                        </platform-specific>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field="parameters.GET_PASSWORD_HINT"/></not>
+                                    </condition>
+                                    <actions>
+                                        <set field="userLoginId" from-field="parameters.USERNAME"/>
+                                        <entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
+                                            <field-map field-name="userLoginId" />
+                                        </entity-and>
+                                        <set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
+                                        <entity-one entity-name="Enumeration" value-field="securityQuestion">
+                                            <field-map field-name="enumId" from-field="questionEnumId"/>
+                                        </entity-one>
+                                        <set field="securityQuestion" from-field="securityQuestion"/>
+                                    </actions>
+                                </section>
+                                <platform-specific>
+                                    <html><html-template location="${forgotPasswordTemplateLocation}"/></html>
+                                </platform-specific>
+                            </widgets>
+                        </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/Theme.xml?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/Theme.xml (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/Theme.xml Sat Sep 21 19:12:23 2019
@@ -151,8 +151,6 @@ under the License.
             <screen name="impersonated"/>
             <screen name="ajaxNotLoggedIn"/>
             <screen name="requirePasswordChange"/>
-            <screen name="forgotPassword_step1"/>
-            <screen name="forgotPassword_step2"/>
             <screen name="forgotPassword"/>
             <screen name="help"/>
             <screen name="viewBlocked"/>

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ChangePassword.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ChangePassword.ftl?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ChangePassword.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ChangePassword.ftl Sat Sep 21 19:12:23 2019
@@ -31,6 +31,7 @@ under the License.
     <form method="post" action="<@o...@ofbizUrl>" name="loginform">
       <input type="hidden" name="requirePasswordChange" value="Y"/>
       <input type="hidden" name="USERNAME" value="${username}"/>
+      <input type="hidden" name="TOKEN" value="${parameters.TOKEN!}"/>
       <input type="hidden" name="userTenantId" value="${tenantId}"/>
       <input type="hidden" name="forgotPwdFlag" value="${parameters.forgotPwdFlag!}" />
       <table cellspacing="0">

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ForgotPassword.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ForgotPassword.ftl?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ForgotPassword.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/ForgotPassword.ftl Sat Sep 21 19:12:23 2019
@@ -16,32 +16,80 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<div id="loginBar"><span>${uiLabelMap.CommonForgotYourPassword}?</span><div id="company-logo"></div></div>
+<#if securityQuestion??>
+    <#assign messageTitle = uiLabelMap.AnswerSecurityQuestion>
+<#else>
+    <#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
+</#if>
+<#if ! userLoginId??>
+    <#assign userLoginId = requestParameters.USERNAME!>
+    <#if ! userLoginId?? && autoUserLogin??>
+        <#assign userLoginId = autoUserLogin.userLoginId>
+    </#if>
+</#if>
+<div id="loginBar"><span>${messageTitle}</span><div id="company-logo"></div></div>
 <center>
-  <div class="screenlet login-screenlet">
-    <div class="screenlet-title-bar">
-      <h3>${uiLabelMap.CommonForgotYourPassword}?</h3>
+    <div class="screenlet login-screenlet">
+        <div class="screenlet-title-bar">
+            <h3>${messageTitle}</h3>
+        </div>
+        <div class="screenlet-body">
+            <form method="post" action="<@o...@ofbizUrl>" name="forgotpassword">
+                <table class="basic-table" cellspacing="0">
+                    <tr>
+                        <td class="label">${uiLabelMap.CommonUsername}</td>
+                        <td><input type="text" size="20" name="USERNAME" value="${userLoginId!}"/></td>
+                    </tr>
+                  <#if securityQuestion?has_content>
+                      <tr>
+                          <td class="label">${uiLabelMap.SecurityQuestion}</td>
+                          <td>
+                              ${securityQuestion.description!}
+                              <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
+                          </td>
+                      </tr>
+                      <tr>
+                          <td class="label">${uiLabelMap.SecurityAnswer}</td>
+                          <td>
+                              <input type="text" name="securityAnswer" class="" value="" />&nbsp;
+                          </td>
+                      </tr>
+                      <tr>
+                          <td colspan="2" align="center">
+                              <input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}"/>
+                          </td>
+                      </tr>
+                  <#elseif requestParameters.token??>
+                      <input type="hidden" name="token" value="${requestParameters.token}"/>
+                      <tr>
+                          <td class="label">${uiLabelMap.CommonNewPassword}</td>
+                          <td><input type="password" name="newPassword" autocomplete="off" value="" size="20"/></td>
+                      </tr>
+                      <tr>
+                          <td class="label">${uiLabelMap.CommonNewPasswordVerify}</td>
+                          <td><input type="password" name="newPasswordVerify" autocomplete="off" value="" size="20"/></td>
+                      </tr>
+                      <tr>
+                          <td colspan="2" align="center">
+                              <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonContinue}"/>
+                          </td>
+                      </tr>
+                  <#else>
+                    <tr>
+                        <td colspan="2" align="center">
+                            <input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}" />&nbsp;
+                            <input type="submit" name="EMAIL_PASSWORD" class="smallSubmit" value="${uiLabelMap.CommonEmailPassword}" />
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" align="center">
+                            <a href='#' class="buttontext" onclick="window.history.back();">${uiLabelMap.CommonGoBack}</a>
+                        </td>
+                    </tr>
+                  </#if>
+                </table>
+                <input type="hidden" name="JavaScriptEnabled" value="N" />
+            </form>
+        </div>
     </div>
-    <div class="screenlet-body">
-      <form method="post" action="<@o...@ofbizUrl>" name="getSecurityQuestion">
-        <table class="basic-table" cellspacing="0">
-          <tr>
-            <td class="label">${uiLabelMap.CommonUsername}</td>
-            <td><input type="text" size="20" name="USERNAME" value="<#if requestParameters.USERNAME?has_content>${requestParameters.USERNAME}<#elseif autoUserLogin?has_content>${autoUserLogin.userLoginId}</#if>"/></td>
-          </tr>
-          <tr>
-            <td colspan="2" align="center">
-              <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonContinue}"/>
-            </td>
-          </tr>
-          <tr>
-            <td colspan="2" align="center">
-              <a href='<@o...@ofbizUrl>' class="buttontext">${uiLabelMap.CommonGoBack}</a>
-            </td>
-          </tr>
-        </table>
-        <input type="hidden" name="JavaScriptEnabled" value="N"/>
-      </form>
-    </div>
-  </div>
-</center>
+</center>
\ No newline at end of file

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/Login.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/Login.ftl?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/Login.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/template/Login.ftl Sat Sep 21 19:12:23 2019
@@ -61,7 +61,7 @@ under the License.
         </table>
         <input type="hidden" name="JavaScriptEnabled" value="N"/>
         <br />
-        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}?</a>
+        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}?</a>
       </form>
     </div>
   </div>

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/widget/Theme.xml?rev=1867296&r1=1867295&r2=1867296&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/widget/Theme.xml (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/rainbowstone/widget/Theme.xml Sat Sep 21 19:12:23 2019
@@ -50,7 +50,6 @@ under the License.
         <property name="VT_NAV_TMPLT_LOC" value="component://rainbowstone/template/includes/TopAppBar.ftl"/>
         <property name="VT_CHPWD_TMPLT_LOC" value="component://rainbowstone/template/ChangePassword.ftl"/>
         <property name="VT_FGPWD_TMPLT_LOC" value="component://rainbowstone/template/ForgotPassword.ftl"/>
-        <property name="VT_GSQUE_TMPLT_LOC" value="component://rainbowstone/template/GetSecurityQuestion.ftl"/>
         <property name="VT_LOGIN_TMPLT_LOC" value="component://rainbowstone/template/Login.ftl"/>
         <!--javascript lib-->
         <property name="VT_HDR_JAVASCRIPT['add']" value="/rainbowstone/js/less.min.js"/>