svn commit: r1165206 - in /ofbiz/trunk/applications/order: webapp/ordermgr/order/newnote.ftl widget/ordermgr/OrderForms.xml widget/ordermgr/OrderViewScreens.xml

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

svn commit: r1165206 - in /ofbiz/trunk/applications/order: webapp/ordermgr/order/newnote.ftl widget/ordermgr/OrderForms.xml widget/ordermgr/OrderViewScreens.xml

adrianc
Author: adrianc
Date: Mon Sep  5 08:35:43 2011
New Revision: 1165206

URL: http://svn.apache.org/viewvc?rev=1165206&view=rev
Log:
Replace newnote.ftl with form widget, patch provided by Anne Jessel (https://issues.apache.org/jira/browse/OFBIZ-4394).

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl
    ofbiz/trunk/applications/order/widget/ordermgr/OrderForms.xml
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderForms.xml?rev=1165206&r1=1165205&r2=1165206&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderForms.xml Mon Sep  5 08:35:43 2011
@@ -246,5 +246,17 @@ under the License.
             <display-entity entity-name="RoleType" description="${description}"/>
         </field>
     </form>
-    
+
+    <form name="OrderNewNote" target="createordernote" type="single">
+        <field name="orderId"><hidden/></field>
+        <field name="note" title="${uiLabelMap.OrderNote}"><textarea rows="5" cols="70"/></field>
+        <field name="internalNote" title="${uiLabelMap.OrderInternalNote}" tooltip="${uiLabelMap.OrderInternalNoteMessage}">
+            <drop-down allow-empty="true" no-current-selected-key="Y">
+                <option key="Y" description="${uiLabelMap.CommonYes}"/>
+                <option key="N" description="${uiLabelMap.CommonNo}"/>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
 </forms>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=1165206&r1=1165205&r2=1165206&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Mon Sep  5 08:35:43 2011
@@ -262,6 +262,9 @@ under the License.
     </screen>
     <screen name="OrderNewNote">
         <section>
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+            </condition>
             <actions>
                 <set field="titleProperty" value="OrderAddNote"/>
                 <set field="headerItem" value="findorders"/>
@@ -270,12 +273,18 @@ under the License.
             <widgets>
                 <decorator-screen name="CommonOrderViewDecorator">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://order/webapp/ordermgr/order/newnote.ftl"/></html>
-                        </platform-specific>
+                        <screenlet title="${uiLabelMap.OrderAddNote}">
+                            <container>
+                                <link target="orderview?orderId=${orderId}" text="${uiLabelMap.OrderBackToOrder}" style="buttontext"/>
+                            </container>
+                            <include-form name="OrderNewNote" location="component://order/widget/ordermgr/OrderForms.xml"/>
+                        </screenlet>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
+            <fail-widgets>
+                <label style="h3">${uiLabelMap.OrderViewPermissionError}</label>
+            </fail-widgets>
         </section>
     </screen>
     <screen name="OrderDeliveryScheduleInfo">