You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/04/12 11:53:07 UTC

svn commit: r527866 - /ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml

Author: lektran
Date: Thu Apr 12 02:53:07 2007
New Revision: 527866

URL: http://svn.apache.org/viewvc?view=rev&rev=527866
Log:
Changed the EditElectronicText form to support additions as well as updates, the existing form AddElectronicText was not being used. 
Fixes bug reported by Michel Dielissen on the mailing list

Modified:
    ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml

Modified: ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml?view=diff&rev=527866&r1=527865&r2=527866
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/DataResourceForms.xml Thu Apr 12 02:53:07 2007
@@ -365,15 +365,11 @@
         <actions>
             <entity-one entity-name="ElectronicText" value-name="electronicText"/>
         </actions>
+        <alt-target use-when="electronicText==null" target="addElectronicText"/>
         <field name="dataResourceId" title="" widget-style="buttontext"><display also-hidden="true"/></field>
         <field name="textData" widget-style="buttontext"><textarea cols="120" rows="24"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-    <form name="AddElectronicText" target="addElectronicText" title="" type="single">
-        <auto-fields-service service-name="createElectronicText"/>
-        <field name="dataResourceId" title="" widget-style="buttontext" map-name="currentValue"><display also-hidden="true"/></field>
-        <field name="textData" widget-style="buttontext"><textarea cols="120" rows="24"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="submitButton"  use-when="electronicText!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="submitButton" use-when="electronicText==null" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
 
     <!-- Html forms -->