Author: apatel
Date: Sun Aug 2 10:49:07 2009
New Revision: 800022
URL: http://svn.apache.org/viewvc?rev=800022&view=rev
Log:
Fix Delete an action under price rule. Patch from OFBIZ-2467. Thanks Rihit
Sureka for reporting and Ahmed Dini for fix patch.
Modified:
ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
Modified:
ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl?rev=800022&r1=800021&r2=800022&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
(original)
+++
ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
Sun Aug 2 10:49:07 2009
@@ -69,6 +69,7 @@
</tr>
<#assign maxCondSeqId = 1>
<#assign rowClass = "2">
+ <#assign rowCount = 0>
<#list productPriceConds as productPriceCond>
<tr valign="middle"<#if rowClass == "1">
class="alternate-row"</#if>>
<#-- if cur seq id is a number and is greater than
max, set new max for input box prefill below -->
@@ -108,8 +109,11 @@
</form>
</td>
<td align="center">
- <a
href="<@ofbizUrl>deleteProductPriceCond?productPriceRuleId=${productPriceCond.productPriceRuleId}&productPriceCondSeqId=${productPriceCond.productPriceCondSeqId}</@ofbizUrl>"
class="buttontext">
- ${uiLabelMap.CommonDelete}</a>
+ <form name= "deleteProductPriceCond_o_${rowCount}"
method= "post" action= "<@ofbizUrl>deleteProductPriceCond</@ofbizUrl>">
+ <input type= "hidden" name=
"productPriceRuleId" value= "${productPriceCond.productPriceRuleId}">
+ <input type= "hidden" name=
"productPriceCondSeqId" value= "${productPriceCond.productPriceCondSeqId}">
+ <a
href="javascript:document.deleteProductPriceCond_o_${rowCount}.submit()"
class="buttontext">${uiLabelMap.CommonRemove}</a>
+ </form>
</td>
</tr>
<#-- toggle the row color -->
@@ -118,6 +122,7 @@
<#else>
<#assign rowClass = "2">
</#if>
+ <#assign rowCount = rowCount + 1>
</#list>
<tr>
<td colspan="3">
@@ -152,6 +157,7 @@
<td width="10%"><b> </b></td>
</tr>
<#assign rowClass = "2">
+ <#assign rowCount = 0>
<#list productPriceActions as productPriceAction>
<tr valign="middle"<#if rowClass == "1">
class="alternate-row"</#if>>
<td
class="label"><b>${productPriceAction.productPriceActionSeqId}</b></td>
@@ -176,10 +182,14 @@
</form>
</td>
<td align="center">
- <a
href="<@ofbizUrl>deleteProductPriceAction?productPriceRuleId=${productPriceAction.productPriceRuleId}&productPriceActionSeqId=${productPriceAction.productPriceActionSeqId}</@ofbizUrl>"
class="buttontext">
- ${uiLabelMap.CommonDelete}</a>
+ <form name=
"deleteProductPriceAction_o_${rowCount}" method= "post" action=
"<@ofbizUrl>deleteProductPriceAction</@ofbizUrl>">
+ <input type= "hidden" name=
"productPriceRuleId" value= "${productPriceAction.productPriceRuleId}">
+ <input type= "hidden" name=
"productPriceActionSeqId" value=
"${productPriceAction.productPriceActionSeqId}">
+ <a
href="javascript:document.deleteProductPriceAction_o_${rowCount}.submit()"
class="buttontext">${uiLabelMap.CommonDelete}</a>
+ </form>
</td>
</tr>
+ <#assign rowCount = rowCount + 1>
<#-- toggle the row color -->
<#if rowClass == "2">
<#assign rowClass = "1">
@@ -208,4 +218,4 @@
</#if>
</table>
</div>
-</div>
\ No newline at end of file
+</div>