You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2011/02/25 12:59:41 UTC

svn commit: r1074484 - /ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl

Author: ashish
Date: Fri Feb 25 11:59:41 2011
New Revision: 1074484

URL: http://svn.apache.org/viewvc?rev=1074484&view=rev
Log:
Bug fix. 
Correct ProductCategoryTypeId is not displaying as selected in dropdown for EditCategory screen, It always show "Catalog" productCategoryType as selected.
This bug is already been fixed in trunk.
Thanks Deepak!


Modified:
    ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl

Modified: ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl?rev=1074484&r1=1074483&r2=1074484&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl (original)
+++ ofbiz/branches/release10.04/applications/product/webapp/catalog/category/EditCategory.ftl Fri Feb 25 11:59:41 2011
@@ -94,9 +94,13 @@ function insertImageName(type,nameValue)
                     <td>&nbsp;</td>
                     <td width="74%">
                         <select name="productCategoryTypeId" size="1">
+                        <#assign selectedKey = "CATALOG_CATEGORY">
                         <#list productCategoryTypes as productCategoryTypeData>
-                        <option <#if ((productCategory?has_content) && (productCategory.productCategoryTypeId==productCategoryTypeData.productCategoryTypeId)) || (productCategoryTypeData.productCategoryTypeId=="CATALOG_CATEGORY")>selected="selected"</#if> value="${productCategoryTypeData.productCategoryTypeId}">${productCategoryTypeData.get("description",locale)}</option>
-                        </#list>
+                          <#if (productCategory?has_content && productCategory.productCategoryTypeId?if_exists == productCategoryTypeData.productCategoryTypeId)>
+                            <#assign selectedKey = productCategory.productCategoryTypeId>
+                          </#if>
+                            <option <#if selectedKey == productCategoryTypeData.productCategoryTypeId>selected="selected"</#if> value="${productCategoryTypeData.productCategoryTypeId}">${productCategoryTypeData.get("description",locale)}</option>
+                          </#list>
                         </select>
                     </td>
                 </tr>