Author: jaz
Date: Thu Sep 6 13:01:36 2007
New Revision: 573353
URL:
http://svn.apache.org/viewvc?rev=573353&view=revLog:
fixed payment method drop down to check permission before displaying full CC details
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl?rev=573353&r1=573352&r2=573353&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl Thu Sep 6 13:01:36 2007
@@ -387,19 +387,25 @@
<td width="5"> </td>
<td nowrap="nowrap">
<select name="paymentMethodId" class="selectBox">
- <#list paymentMethodValueMaps as paymentMethodValueMap>
- <#assign paymentMethod = paymentMethodValueMap.paymentMethod/>
- <option value="${paymentMethod.get("paymentMethodId")?if_exists}">
- <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId>
- <#assign creditCard = paymentMethodValueMap.creditCard/>
- ${creditCard.cardType?if_exists} ${creditCard.cardNumber?if_exists} ${creditCard.expireDate?if_exists}
- <#else>
- ${paymentMethod.paymentMethodTypeId?if_exists}
- <#if paymentMethod.description?exists>${paymentMethod.description}</#if>
- (${paymentMethod.paymentMethodId})
- </#if>
- </option>
- </#list>
+ <#list paymentMethodValueMaps as paymentMethodValueMap>
+ <#assign paymentMethod = paymentMethodValueMap.paymentMethod/>
+ <option value="${paymentMethod.get("paymentMethodId")?if_exists}">
+ <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId>
+ <#assign creditCard = paymentMethodValueMap.creditCard/>
+ <#if (creditCard?has_content)>
+ <#if security.hasEntityPermission("PAY_INFO", "_VIEW", session)>
+ ${creditCard.cardType?if_exists} ${creditCard.cardNumber?if_exists} ${creditCard.expireDate?if_exists}
+ <#else>
+ ${Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)}
+ </#if>
+ </#if>
+ <#else>
+ ${paymentMethod.paymentMethodTypeId?if_exists}
+ <#if paymentMethod.description?exists>${paymentMethod.description}</#if>
+ (${paymentMethod.paymentMethodId})
+ </#if>
+ </option>
+ </#list>
</select>
</td>
</tr>