Author: ashish Date: Mon Jun 27 08:01:40 2016 New Revision: 1750302 URL: http://svn.apache.org/viewvc?rev=1750302&view=rev Log: Applied patch from jira issue - OFBIZ-7570 - Remove HtmlFormWrapper dependencies from Order Delivery Schedule Info screen. Thanks Ravi for the contribution.
Removed: ofbiz/trunk/applications/order/template/order/OrderDeliveryScheduleInfo.ftl Modified: ofbiz/trunk/applications/order/groovyScripts/order/OrderDeliveryScheduleInfo.groovy ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Modified: ofbiz/trunk/applications/order/groovyScripts/order/OrderDeliveryScheduleInfo.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/order/OrderDeliveryScheduleInfo.groovy?rev=1750302&r1=1750301&r2=1750302&view=diff ============================================================================== --- ofbiz/trunk/applications/order/groovyScripts/order/OrderDeliveryScheduleInfo.groovy (original) +++ ofbiz/trunk/applications/order/groovyScripts/order/OrderDeliveryScheduleInfo.groovy Mon Jun 27 08:01:40 2016 @@ -19,7 +19,6 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.*; -import org.ofbiz.widget.renderer.html.HtmlFormWrapper; orderId = request.getParameter("orderId"); orderTypeId = null; @@ -38,15 +37,9 @@ hasSupplierRelatedPermissionStr = checkR // Determine what the reuslt is, no result is FALSE hasSupplierRelatedPermission = "true".equals(hasSupplierRelatedPermissionStr); -// Initialize the PO Delivery Schedule form -updatePODeliveryInfoWrapper = new HtmlFormWrapper("component://order/widget/ordermgr/OrderDeliveryScheduleForms.xml", "UpdateDeliveryScheduleInformation", request, response); -updatePODeliveryInfoWrapper.putInContext("orderId", orderId); -updatePODeliveryInfoWrapper.putInContext("orderItemSeqId", "_NA_"); -updatePODeliveryInfoWrapper.putInContext("schedule", schedule); -updatePODeliveryInfoWrapper.putInContext("hasSupplierRelatedPermission", hasSupplierRelatedPermission); - context.orderId = orderId; +context.orderItemSeqId = "_NA_"; context.orderTypeId = orderTypeId; context.orderHeader = orderHeader; -context.hasPermission = hasSupplierRelatedPermission; -context.updatePODeliveryInfoWrapper = updatePODeliveryInfoWrapper; +context.schedule = schedule; +context.hasPermission = hasSupplierRelatedPermission; \ No newline at end of file Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=1750302&r1=1750301&r2=1750302&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Mon Jun 27 08:01:40 2016 @@ -310,9 +310,34 @@ under the License. <widgets> <decorator-screen name="CommonOrderViewDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://order/template/order/OrderDeliveryScheduleInfo.ftl"/></html> - </platform-specific> + <section> + <condition> + <if-compare operator="equals" value="true" field="hasPermission"/> + </condition> + <widgets> + <screenlet title="${uiLabelMap.OrderScheduleDelivery}"> + <container style="button-bar"> + <link target="orderview" text="${uiLabelMap.OrderViewOrder}" style="buttontext"> + <parameter param-name="orderId" from-field="orderId"/> + </link> + </container> + <section> + <condition> + <not><if-empty field="orderId"/></not> + </condition> + <widgets> + <include-form name="UpdateDeliveryScheduleInformation" location="component://order/widget/ordermgr/OrderDeliveryScheduleForms.xml"/> + </widgets> + <fail-widgets> + <label text="${uiLabelMap.OrderNoPurchaseSpecified}"></label> + </fail-widgets> + </section> + </screenlet> + </widgets> + <fail-widgets> + <label style="h3" text="${uiLabelMap.OrderViewPermissionError}"></label> + </fail-widgets> + </section> </decorator-section> </decorator-screen> </widgets>