Author: nmalin
Date: Fri Sep 27 19:25:08 2019 New Revision: 1867647 URL: http://svn.apache.org/viewvc?rev=1867647&view=rev Log: Improved: Any ecommerce user has the ability to reset anothers password (including admin) via "Forget Your Password" (OFBIZ-4361) Update ecommerce plugin to use the forget passord process with jwtToken : * Add jwtToken managment on update password page * Change changepassword to passwordChange on controller for align with common-controller Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ChangePassword.ftl ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ViewProfile.ftl ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/WEB-INF/controller.xml ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CustomerScreens.xml Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ChangePassword.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ChangePassword.ftl?rev=1867647&r1=1867646&r2=1867647&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ChangePassword.ftl (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ChangePassword.ftl Fri Sep 27 19:25:08 2019 @@ -26,12 +26,16 @@ under the License. ${uiLabelMap.CommonSave} </a> <form id="changepasswordform" method="post" action="<@ofbizUrl>updatePassword/${donePage}</@ofbizUrl>"> + <#if !parameters.TOKEN?has_content> <label class="mt-4 asteriskInput" for="currentPassword">${uiLabelMap.PartyOldPassword}</label> <div class="row"> <div class="col-sm-6"> <input type="password" class="form-control" name="currentPassword" autocomplete="off" id="currentPassword"/> </div> </div> + <#else> + <input type="hidden" name="TOKEN" value="${parameters.TOKEN}"/> + </#if> <label class="required" for="newPassword">${uiLabelMap.PartyNewPassword}</label> <div class="row"> <div class="col-sm-6"> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ViewProfile.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ViewProfile.ftl?rev=1867647&r1=1867646&r2=1867647&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ViewProfile.ftl (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/ViewProfile.ftl Fri Sep 27 19:25:08 2019 @@ -380,7 +380,7 @@ under the License. <strong>${uiLabelMap.CommonUsername} & ${uiLabelMap.CommonPassword}</strong> </div> <div class="col-lg-9 text-right"> - <a href="<@ofbizUrl>changepassword</@ofbizUrl>">${uiLabelMap.PartyChangePassword}</a> + <a href="<@ofbizUrl>passwordChange</@ofbizUrl>">${uiLabelMap.PartyChangePassword}</a> </div> </div> </div> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=1867647&r1=1867646&r2=1867647&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Fri Sep 27 19:25:08 2019 @@ -1138,16 +1138,16 @@ under the License. <response name="error" type="view" value="viewprofile"/> </request-map> - <request-map uri="changepassword"> + <request-map uri="passwordChange"> <security https="true" auth="true"/> - <response name="success" type="view" value="changepassword"/> + <response name="success" type="view" value="passwordChange"/> </request-map> <request-map uri="updatePassword"> <security https="true" auth="true"/> <event type="simple" path="component://securityext/minilang/login/LoginSimpleEvents.xml" invoke="updatePassword"/> - <response name="success" type="view" value="changepassword"/> - <response name="error" type="view" value="changepassword"/> + <response name="success" type="view" value="passwordChange"/> + <response name="error" type="view" value="passwordChange"/> </request-map> <request-map uri="forgotpassword"> @@ -1927,7 +1927,7 @@ under the License. <view-map name="editcreditcard" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#editcreditcard"/> <view-map name="editeftaccount" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#editeftaccount"/> <view-map name="editgiftcard" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#editgiftcard"/> - <view-map name="changepassword" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#changepassword"/> + <view-map name="passwordChange" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#passwordChange"/> <view-map name="editperson" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#editperson"/> <view-map name="giftcardbalance" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#giftcardbalance"/> <view-map name="giftcardlink" type="screen" page="component://ecommerce/widget/CustomerScreens.xml#giftcardlink"/> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CustomerScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CustomerScreens.xml?rev=1867647&r1=1867646&r2=1867647&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CustomerScreens.xml (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CustomerScreens.xml Fri Sep 27 19:25:08 2019 @@ -122,7 +122,7 @@ under the License. </section> </screen> - <screen name="changepassword"> + <screen name="passwordChange"> <section> <actions> <set field="titleProperty" value="PageTitleChangePassword"/> |
Free forum by Nabble | Edit this page |