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/02/09 10:11:46 UTC

svn commit: r505225 - /ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl

Author: lektran
Date: Fri Feb  9 01:11:45 2007
New Revision: 505225

URL: http://svn.apache.org/viewvc?view=rev&rev=505225
Log:
Applied patch from Ashish Vijaywargiya, OFBIZ-694.  When applying features to products, the dropdowns now default to Selectable if the product is virtual otherwise they default to Standard

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl?view=diff&rev=505225&r1=505224&r2=505225
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl Fri Feb  9 01:11:45 2007
@@ -100,9 +100,13 @@
                 <option value='${(productFeatureGroup.productFeatureGroupId)?if_exists}'>${(productFeatureGroup.description)?if_exists} [${(productFeatureGroup.productFeatureGroupId)?if_exists}]</option>
             </#list>
         </select>
-        <span class='tabletext'>${uiLabelMap.ProductFeatureApplicationType}: </span><select class='selectBox' name='productFeatureApplTypeId' size="1">
+        <span class='tabletext'>${uiLabelMap.ProductFeatureApplicationType}: </span>
+        <select class='selectBox' name='productFeatureApplTypeId' size="1">
             <#list productFeatureApplTypes as productFeatureApplType>
-            <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}'>${(productFeatureApplType.get("description",locale))?if_exists} </option>
+               <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}' 
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId?if_exists =="STANDARD_FEATURE")>selected</#if>
+               >${(productFeatureApplType.get("description",locale))?if_exists} </option>           
             </#list>
         </select>
         <input type="submit" value='${uiLabelMap.CommonAdd}' style='font-size: x-small;'>
@@ -121,9 +125,13 @@
         </select>
         <span class='tabletext'>${uiLabelMap.CommonIdCode}: </span><input type="text" size='10' name='idCode' value='' class='inputBox'>
         <br/>
-        <span class='tabletext'>${uiLabelMap.ProductFeatureApplicationType}: </span><select class='selectBox' name='productFeatureApplTypeId' size="1">
+        <span class='tabletext'>${uiLabelMap.ProductFeatureApplicationType}: </span>
+        <select class='selectBox' name='productFeatureApplTypeId' size="1">
             <#list productFeatureApplTypes as productFeatureApplType>
-            <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}'>${(productFeatureApplType.get("description",locale))?if_exists} </option>
+               <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}' 
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected</#if>
+               >${(productFeatureApplType.get("description",locale))?if_exists} </option>           
             </#list>
         </select>
         <br/>
@@ -148,9 +156,13 @@
                 <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'>
             </a> 
         </span>
-        <span class="tabletext">${uiLabelMap.ProductFeatureApplicationType}: </span><select class="selectBox" name="productFeatureApplTypeId" size="1">
+        <span class="tabletext">${uiLabelMap.ProductFeatureApplicationType}: </span>
+        <select class="selectBox" name="productFeatureApplTypeId" size="1">
             <#list productFeatureApplTypes as productFeatureApplType>
-            <option value="${(productFeatureApplType.productFeatureApplTypeId)?if_exists}">${(productFeatureApplType.get("description",locale))?if_exists} </option>
+               <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}' 
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
+               <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected</#if>
+               >${(productFeatureApplType.get("description",locale))?if_exists} </option>           
             </#list>
         </select>
         <br/>