Author: diveshdutta
Date: Mon Sep 5 16:39:15 2016
New Revision: 1759331
URL:
http://svn.apache.org/viewvc?rev=1759331&view=revLog:
[OFBIZ-7724] Fixed: System allows to change status from cancel to empty for return and allow-empty flag of form widget does not honour to add or not empty option field in drop-down. Thanks Ankush for reproting and fixing this issue.
Modified:
ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl
ofbiz/trunk/framework/widget/templates/HtmlFormMacroLibrary.ftl
Modified: ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl?rev=1759331&r1=1759330&r2=1759331&view=diff==============================================================================
--- ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl (original)
+++ ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl Mon Sep 5 16:39:15 2016
@@ -43,7 +43,7 @@ under the License.
<#assign partyId = "${(returnHeader.fromPartyId)!}"/>
<a href="<@ofbizUrl>setOrderCurrencyAgreementShipDates?partyId=${partyId!}&originOrderId=${orderId!}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateExchangeOrder} ${uiLabelMap.CommonFor} ${orderId!}</a>
</#if>
- <#if "RETURN_ACCEPTED" == returnHeader.statusId>
+ <#if returnHeader.statusId?has_content && "RETURN_ACCEPTED" == returnHeader.statusId>
<#assign returnItems = delegator.findByAnd("ReturnItem", {"returnId" : returnId}, null, false)/>
<#if returnItems?has_content>
<#assign orderId = (Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(returnItems)).getString("orderId")/>
Modified: ofbiz/trunk/framework/widget/templates/HtmlFormMacroLibrary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/HtmlFormMacroLibrary.ftl?rev=1759331&r1=1759330&r2=1759331&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/templates/HtmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/HtmlFormMacroLibrary.ftl Mon Sep 5 16:39:15 2016
@@ -234,8 +234,10 @@ under the License.
<#if firstInList?has_content && currentValue?has_content && !multiple?has_content>
<option selected="selected" value="${currentValue}">${explicitDescription?replace("\'","'")}</option><#rt/><#-- replace("\'","'") related to OFBIZ-6504 -->
</#if>
- <#if allowEmpty?has_content || !options?has_content>
+ <#if allowEmpty?has_content && allowEmpty=="Y">
<option value=""> </option>
+ <#elseif allowEmpty=="N" && !options?has_content>
+ <option value=""> </option>
</#if>
<#list options as item>
<#if multiple?has_content>