Author: jacopoc
Date: Thu May 6 06:55:26 2010
New Revision: 941591
URL: http://svn.apache.org/viewvc?rev=941591&view=rev
Log:
Converted and refactored html form into form widget.
Modified:
ofbiz/trunk/applications/product/config/ProductUiLabels.xml
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=941591&r1=941590&r2=941591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu May 6
06:55:26 2010
@@ -7722,12 +7722,12 @@
<value
xml:lang="zh">æä¼åå
³èå°åç±»(è¾å
¥ä¼åæ è¯ãéæ©ç±»åï¼ç¶åè¾å
¥å¯éçå¼å§æ¥æ)</value>
</property>
<property key="ProductAssociatePartyToProduct">
- <value xml:lang="de">Akteur zu Produkt zuordnen (Akteur ID eingeben,
Typ wählen und optional Von Datum eingeben)</value>
- <value xml:lang="en">Associate Party to Product (enter Party ID,
select Type, then enter optional From Date)</value>
- <value xml:lang="fr">Associer l'acteur à l'article (entrer une réf.
acteur, sélectionner le type, en option : une date de départ)</value>
- <value xml:lang="it">Associare Soggetto al Prodotto (inserire Codice
Soggetto, seleziona Tipo, allora inserire opzionalmente Da Data)</value>
- <value
xml:lang="th">à¹à¸à¸·à¹à¸à¸¡à¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡à¹à¸à¸¢à¸±à¸à¸ªà¸´à¸à¸à¹à¸²
(à¸à¸£à¸à¸à¸£à¸«à¸±à¸ªà¸£à¸«à¸±à¸ªà¸à¸¥à¸¸à¹à¸¡à¸à¸¹à¹à¹à¸à¹ ,
à¹à¸¥à¸·à¸à¸à¸à¸£à¸°à¹à¸ ภ,
หลัà¸à¸à¸²à¸à¸à¸±à¹à¸à¹à¸¥à¸·à¸à¸à¸à¸²à¸à¸§à¸±à¸à¸à¸µà¹)</value>
- <value
xml:lang="zh">æä¼åå
³èå°äº§å(è¾å
¥ä¼åæ è¯ãéæ©ç±»åï¼ç¶åè¾å
¥å¯éçå¼å§æ¥æ)</value>
+ <value xml:lang="de">Akteur zu Produkt zuordnen</value>
+ <value xml:lang="en">Associate Party to Product</value>
+ <value xml:lang="fr">Associer l'acteur à l'article</value>
+ <value xml:lang="it">Associare Soggetto al Prodotto</value>
+ <value
xml:lang="th">à¹à¸à¸·à¹à¸à¸¡à¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡à¹à¸à¸¢à¸±à¸à¸ªà¸´à¸à¸à¹à¸²</value>
+ <value xml:lang="zh">æä¼åå
³èå°äº§å</value>
</property>
<property key="ProductAssociationNotFound">
<value xml:lang="de">Zuordnung nicht gefunden: Produkt
ID=${productId?if_exists}, Produkt ID Zu=${productIdTo?if_exists},
Zuordnungstyp ID=${productAssocTypeId?if_exists}, Von
Datum=${fromDate?if_exists}</value>
Modified:
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl?rev=941591&r1=941590&r2=941591&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
(original)
+++
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
Thu May 6 06:55:26 2010
@@ -22,6 +22,8 @@ under the License.
<tr class="header-row">
<td>${uiLabelMap.PartyPartyId}</td>
<td>${uiLabelMap.PartyRole}</td>
+ <td>${uiLabelMap.CommonSequenceNum}</td>
+ <td>${uiLabelMap.CommonComments}</td>
<td>${uiLabelMap.CommonFromDateTime}</td>
<td>${uiLabelMap.CommonThruDateTime}</td>
<td> </td>
@@ -34,6 +36,8 @@ under the License.
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a
href="/partymgr/control/viewprofile?partyId=${(productRole.partyId)?if_exists}"
target="_blank" class="buttontext">${(productRole.partyId)?if_exists}</a></td>
<td>${(curRoleType.get("description",locale))?if_exists}</td>
+ <td>${productRole.sequenceNum?if_exists}</td>
+ <td>${productRole.comments?if_exists}</td>
<#assign hasntStarted = false>
<#if (productRole.getTimestamp("fromDate"))?exists &&
Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().before(productRole.getTimestamp("fromDate"))>
<#assign hasntStarted = true></#if>
<td<#if hasntStarted>
class="alert"</#if>>${(productRole.fromDate)?if_exists}</td>
@@ -50,6 +54,7 @@ under the License.
<input type="submit" value="${uiLabelMap.CommonUpdate}" />
</form>
</td>
+
<td align="center">
<form action="<@ofbizUrl>removePartyFromProduct</@ofbizUrl>"
method="post">
<input type="hidden" name="partyId"
value="${(productRole.partyId)?if_exists}" />
@@ -68,21 +73,4 @@ under the License.
</#if>
</#list>
</table>
- <br />
- <h2>${uiLabelMap.ProductAssociatePartyToProduct}:</h2>
- <br />
- <form method="post" action="<@ofbizUrl>addPartyToProduct</@ofbizUrl>"
name="addNewForm">
- <input type="hidden" name="productId" value="${productId}" />
- <#-- TODO: Add PartyId lookup screen
- <@htmlTemplate.lookupField formName="addNewForm" name="partyId"
id="partyId" fieldFormName="LookupCustomerName"/>
- -->
- <select name="roleTypeId" size="1">
- <#list roleTypes as roleType>
- <option value="${(roleType.roleTypeId)?if_exists}" <#if
roleType.roleTypeId.equals("_NA_")>
selected="selected"</#if>>${(roleType.get("description",locale))?if_exists}</option>
- </#list>
- </select>
- <input type="text" size="25" name="fromDate" />
- <a href="javascript:call_cal(document.addNewForm.fromDate,
'${nowTimestamp?string}');"><img
src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16"
height="16" border="0" alt="Calendar" /></a>
- <input type="submit" value="${uiLabelMap.CommonAdd}" />
- </form>
</#if>
Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=941591&r1=941590&r2=941591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Thu May 6
06:55:26 2010
@@ -2008,4 +2008,20 @@ 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="AddProductRole" type="single" target="addPartyToProduct"
title=""
+ header-row-style="header-row" default-table-style="basic-table">
+ <auto-fields-service service-name="addPartyToProduct"/>
+ <field name="productId"><hidden/></field>
+ <field name="partyId"><lookup
target-form-name="LookupPartyName"/></field>
+ <field name="roleTypeId">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="RoleType"
description="${description}" key-field-name="roleTypeId">
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonCreate}"
widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
</forms>
Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=941591&r1=941590&r2=941591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
(original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Thu May
6 06:55:26 2010
@@ -1171,10 +1171,6 @@ under the License.
<order-by field-name="roleTypeId"/>
<order-by field-name="partyId"/>
</entity-condition>
-
- <entity-condition entity-name="RoleType" list="roleTypes">
- <order-by field-name="description"/>
- </entity-condition>
</actions>
<widgets>
<decorator-screen name="CommonProductDecorator"
location="${parameters.mainDecoratorLocation}">
@@ -1184,6 +1180,9 @@ under the License.
<html><html-template
location="component://product/webapp/catalog/product/EditProductParties.ftl"/></html>
</platform-specific>
</screenlet>
+ <screenlet
title="${uiLabelMap.ProductAssociatePartyToProduct}">
+ <include-form name="AddProductRole"
location="component://product/widget/catalog/ProductForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>