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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

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

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


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

commit 1a8410f98b2f426627901e76166371dfeebef210
Author: Pawan Verma <[hidden email]>
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="<@ofbizUrl>addordertocart/orderstatus</@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>