You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Pierre Smits <pi...@gmail.com> on 2015/01/23 08:13:18 UTC
Re: svn commit: r1653938 - /ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
The lookup function is a good way to get to the right record fast when the list is long. Type a head and search/find.
Verstuurd vanaf mijn iPad
> Op 22 jan. 2015 om 17:35 heeft jleroux@apache.org het volgende geschreven:
>
> Author: jleroux
> Date: Thu Jan 22 16:35:19 2015
> New Revision: 1653938
>
> URL: http://svn.apache.org/r1653938
> Log:
> Despite that I don't like how the lookups are not inlined by default in FTL templates (so I had to separate by line to keep things clear) I still prefer to have lookups for product and party. Here they are for rules actions creation and update
>
> Modified:
> ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
>
> Modified: ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl?rev=1653938&r1=1653937&r2=1653938&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl Thu Jan 22 16:35:19 2015
> @@ -274,7 +274,7 @@ under the License.
> <td>
> <div>
> <b> ${uiLabelMap.ProductAction} ${(productPromoAction.productPromoActionSeqId)!}</b>
> - <form method="post" action="<@o...@ofbizUrl>">
> + <form method="post" action="<@o...@ofbizUrl>" name="updateProductPromoAction">
> <input type="hidden" name="productPromoId" value="${(productPromoAction.productPromoId)!}" />
> <input type="hidden" name="productPromoRuleId" value="${(productPromoAction.productPromoRuleId)!}" />
> <input type="hidden" name="productPromoActionSeqId" value="${(productPromoAction.productPromoActionSeqId)!}" />
> @@ -293,8 +293,11 @@ under the License.
> <input type="hidden" name="orderAdjustmentTypeId" value="${(productPromoAction.orderAdjustmentTypeId)!}" />
> ${uiLabelMap.ProductQuantity}: <input type="text" size="5" name="quantity" value="${(productPromoAction.quantity)!}" />
> ${uiLabelMap.ProductAmount}: <input type="text" size="5" name="amount" value="${(productPromoAction.amount)!}" />
> - ${uiLabelMap.ProductItemId}: <input type="text" size="15" name="productId" value="${(productPromoAction.productId)!}" />
> - ${uiLabelMap.PartyParty}: <input type="text" size="10" name="partyId" value="${(productPromoAction.partyId)!}" /><br />
> + <br/>
> + ${uiLabelMap.ProductItemId}: <@htmlTemplate.lookupField value="${(productPromoAction.productId)!}" formName="updateProductPromoAction" name="productId" id="productId" fieldFormName="LookupProduct"/>
> + <br/>
> + ${uiLabelMap.PartyParty}: <@htmlTemplate.lookupField value="${(productPromoAction.partyId)!}" formName="updateProductPromoAction" name="partyId" id="partyId" fieldFormName="LookupUserLoginAndPartyDetails"/>
> + <br/>
> ${uiLabelMap.ProductServiceName}: <input type="text" size="20" name="serviceName" value="${(productPromoAction.serviceName)!}" />
> ${uiLabelMap.UseCartQuantity}:
> <select name="useCartQuantity">
> @@ -415,7 +418,7 @@ under the License.
> <tr>
> <td colspan="3">
> <div>
> - <form method="post" action="<@o...@ofbizUrl>">
> + <form method="post" action="<@o...@ofbizUrl>" name="createProductPromoAction">
> <input type="hidden" name="productPromoId" value="${(productPromoRule.productPromoId)!}" />
> <input type="hidden" name="productPromoRuleId" value="${(productPromoRule.productPromoRuleId)!}" />
> <span class="label"><b>${uiLabelMap.CommonNew}:</b> </span>
> @@ -427,8 +430,11 @@ under the License.
> <input type="hidden" name="orderAdjustmentTypeId" value="PROMOTION_ADJUSTMENT" />
> ${uiLabelMap.ProductQuantity}: <input type="text" size="5" name="quantity" />
> ${uiLabelMap.ProductAmount}: <input type="text" size="5" name="amount" />
> - ${uiLabelMap.ProductItemId}: <input type="text" size="15" name="productId" />
> - ${uiLabelMap.PartyParty}: <input type="text" size="10" name="partyId" /><br />
> + <br/>
> + ${uiLabelMap.ProductItemId}:<@htmlTemplate.lookupField formName="createProductPromoAction" name="productId" id="productId" fieldFormName="LookupProduct"/>
> + <br/>
> + ${uiLabelMap.PartyParty}: <@htmlTemplate.lookupField formName="createProductPromoAction" name="partyId" id="partyId" fieldFormName="LookupUserLoginAndPartyDetails"/>
> + <br/>
> ${uiLabelMap.ProductServiceName}: <input type="text" size="20" name="serviceName" />
> ${uiLabelMap.UseCartQuantity}:
> <select name="useCartQuantity">
>
>