You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/03/24 14:43:08 UTC

svn commit: r1580850 - in /ofbiz/trunk/applications/product: webapp/catalog/product/EditProductParties.ftl widget/catalog/ProductForms.xml widget/catalog/ProductScreens.xml

Author: jleroux
Date: Mon Mar 24 13:43:08 2014
New Revision: 1580850

URL: http://svn.apache.org/r1580850
Log:
A patch from Jensing Choe  for "Missing externalLoginKey on FTL intra-app in EditProductParties" https://issues.apache.org/jira/browse/OFBIZ-5553

https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductParties?productId=FORKLIFT_PROPANE
when you click on the hyperlink Party Id
ofbiz will open in a new tab and asking for authentication again.

jleroux: this patch fixes a bug and replaces the EditProductParties.ftl Freemarker template by the UpdateProductRole form

Removed:
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
Modified:
    ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1580850&r1=1580849&r2=1580850&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Mon Mar 24 13:43:08 2014
@@ -2129,7 +2129,36 @@ under the License.
     <form name="EditCommEvent" extends="EditCommEvent" extends-resource="component://party/widget/partymgr/CommunicationEventForms.xml">
         <field name="productId" map-name="parameters"><hidden/></field>
     </form>
-
+    
+    <form name="UpdateProductRole" type="list" target="updatePartyToProduct" title="" list-name="productRoles"
+        odd-row-style="alternate-row" default-table-style="basic-table">
+        <auto-fields-service service-name="updatePartyToProduct"/>
+        <field name="productId"><hidden/></field>
+        <field name="sequenceNum"><text size="5"/></field>
+        <field name="comments"><text size="30"/></field>
+        
+        <!-- three possibilities for the Party: person, partyGroup, neither... just print everything and if it's empty, no biggie -->
+        <field name="partyId" title="${uiLabelMap.PartyParty}">
+            <display-entity entity-name="PartyNameView" description="${personalTitle} ${firstName} ${middleName} ${lastName} ${suffix} ${groupName}" also-hidden="true" cache="false">
+                <sub-hyperlink target-type="inter-app" link-style="buttontext" target="/partymgr/control/viewprofile" description="${partyId}">
+                    <parameter param-name="party_id" from-field="partyId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="roleTypeId" title="${uiLabelMap.PartyRole}"><display-entity entity-name="RoleType"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDateTime}" red-when="after-now"><display/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDateTime}" red-when="before-now"></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="deleteLink" title=" " widget-style="buttontext">
+            <hyperlink target="removePartyFromProduct" description="${uiLabelMap.CommonDelete}" also-hidden="false">
+              <parameter param-name="productId"/>
+              <parameter param-name="partyId"/>
+              <parameter param-name="roleTypeId"/>
+              <parameter param-name="fromDate"/>
+            </hyperlink>
+        </field>
+    </form>
+    
     <form name="AddProductRole" type="single" target="addPartyToProduct" title=""
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="addPartyToProduct"/>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=1580850&r1=1580849&r2=1580850&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Mon Mar 24 13:43:08 2014
@@ -1231,10 +1231,9 @@ under the License.
                 <decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet title="${uiLabelMap.PageTitleEditProductParties}">
-                            <platform-specific>
-                                <html><html-template location="component://product/webapp/catalog/product/EditProductParties.ftl"/></html>
-                            </platform-specific>
+                            <include-form name="UpdateProductRole" location="component://product/widget/catalog/ProductForms.xml"/>
                         </screenlet>
+                        
                         <screenlet title="${uiLabelMap.ProductAssociatePartyToProduct}">
                             <include-form name="AddProductRole" location="component://product/widget/catalog/ProductForms.xml"/>
                         </screenlet>