You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by di...@apache.org on 2015/10/03 16:20:01 UTC

svn commit: r1706591 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

Author: diveshdutta
Date: Sat Oct  3 14:20:01 2015
New Revision: 1706591

URL: http://svn.apache.org/viewvc?rev=1706591&view=rev
Log:
[OFBIZ-5579] When adding Asset products into the cart, we will show Number of Persons field in UI only when reserMaxPersons field is defined in Product table. So this way we are binding Number of Persons field to datbase field. This way we avoid confusing UI that we don't show Number Of Persons field when its not needed. Simillarly Number Of Rooms field is  also confusing in UI when Asset product is not room. We don't have any way to figure out which product is Room. So for now we have generalized the field and called it quantity. 

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=1706591&r1=1706590&r2=1706591&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Sat Oct  3 14:20:01 2015
@@ -533,10 +533,16 @@ ${virtualJavaScript!}
                 <table width="100%"><tr>
                     <@htmlTemplate.renderDateTimeField name="reservStart" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="startDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
                     <@htmlTemplate.renderDateTimeField name="reservEnd" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="endDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
-                <tr>
-                <#--td nowrap="nowrap" align="right">Number<br />of days</td><td><input type="textt" size="4" name="reservLength"/></td></tr><tr><td>&nbsp;</td><td align="right" nowrap>&nbsp;</td-->
-                <td nowrap="nowrap" align="right">Number of persons</td><td><input type="text" size="4" name="reservPersons" value="2"/></td>
-                <td nowrap="nowrap" align="right">Number of rooms</td><td><input type="text" size="5" name="quantity" value="1"/></td></tr></table>
+                  <tr>
+                    <#--td nowrap="nowrap" align="right">Number<br />of days</td><td><input type="textt" size="4" name="reservLength"/></td></tr><tr><td>&nbsp;</td><td align="right" nowrap>&nbsp;</td-->
+                    <#if (product.reservMaxPersons!)?is_number>
+                      <td nowrap="nowrap" align="right">Number of persons</td>
+                      <td><input type="text" size="4" name="reservPersons" value="2"/></td>
+                    </#if>
+                      <td nowrap="nowrap" align="right">Quantity</td>
+                      <td><input type="text" size="5" name="quantity" value="1"/></td>
+                  </tr>
+                </table>
             <#else/>
                 <input type="text" size="5" name="quantity" value="1"<#if product.isVirtual!?upper_case == "Y"> disabled="disabled"</#if>/>
             </#if>