You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pa...@apache.org on 2020/07/11 05:02:35 UTC

[ofbiz-plugins] branch release18.12 updated: Fixed: Send me this every month link is not working in order items section(OFBIZ-10891)

This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new b93265d  Fixed: Send me this every month link is not working in order items section(OFBIZ-10891)
b93265d is described below

commit b93265d798a8fea1f907a5ae13c2abb1c9f86381
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Sat Jul 11 10:30:54 2020 +0530

    Fixed: Send me this every month link is not working in order items section(OFBIZ-10891)
    
    Thanks, Ashish for the report, Vivek for lookup and Amit for the patch.
---
 ecommerce/template/order/OrderItems.ftl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ecommerce/template/order/OrderItems.ftl b/ecommerce/template/order/OrderItems.ftl
index d8b2888..dc487bd 100644
--- a/ecommerce/template/order/OrderItems.ftl
+++ b/ecommerce/template/order/OrderItems.ftl
@@ -21,6 +21,14 @@ under the License.
 <#-- the "urlPrefix" value will be prepended to URLs by the ofbizUrl transform if/when there is no "request" object in the context -->
 <#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/></#if>
 <div class="card">
+    <#if "Y" == maySelectItems?default("N") && "PLACING_CUSTOMER" == roleTypeId!>
+      <form method="post" id="sendMeThisEveryMonthForm" name="sendMeThisEveryMonthForm" action="<@ofbizUrl fullPath='true'>createShoppingListFromOrder</...@ofbizUrl>">
+        <input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
+        <input type="hidden" name="frequency" value="6"/>
+        <input type="hidden" name="intervalNumber" value="1"/>
+        <input type="hidden" name="shoppingListTypeId" value="SLT_AUTO_REODR"/>
+      </form>
+    </#if>
     <#if "Y" == maySelectItems?default("N")>
           <form name="addCommonToCartForm" action="<@o...@ofbizUrl>" method="post">
         <input type="hidden" name="add_all" value="false" />    
@@ -36,8 +44,7 @@ under the License.
           class="btn btn-sm float-right">${uiLabelMap.OrderAddAllToCart}</a>
       <a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()"
           class="btn btn-sm float-right">${uiLabelMap.OrderAddCheckedToCart}</a>
-      <a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&amp;frequency=6&amp;intervalNumber=1&amp;shoppingListTypeId=SLT_AUTO_REODR</...@ofbizUrl>"
-          class="btn btn-sm float-right">${uiLabelMap.OrderSendMeThisEveryMonth}</a>
+      <button form="sendMeThisEveryMonthForm" class="btn btn-sm float-right" type="submit">${uiLabelMap.OrderSendMeThisEveryMonth}</button>
     </#if>
     </strong>
   </div>