svn commit: r565363 - in /ofbiz/trunk/applications: accounting/webapp/accounting/common/ accounting/webapp/accounting/payment/ accounting/widget/ ecommerce/webapp/ecommerce/customer/ ecommerce/webapp/ecommerce/order/ ecommerce/widget/ party/webapp/part...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r565363 - in /ofbiz/trunk/applications: accounting/webapp/accounting/common/ accounting/webapp/accounting/payment/ accounting/widget/ ecommerce/webapp/ecommerce/customer/ ecommerce/webapp/ecommerce/order/ ecommerce/widget/ party/webapp/part...

rayb-2
Author: rayb
Date: Mon Aug 13 07:22:19 2007
New Revision: 565363

URL: http://svn.apache.org/viewvc?view=rev&rev=565363
Log:
A reusable ftl file, in the accounts module, that contains the standard credit card fields. It expects the caller to create the enclosing form and table as most of the calling pages have different container requirements : OFBIZ-1194

Added:
    ofbiz/trunk/applications/accounting/webapp/accounting/common/
    ofbiz/trunk/applications/accounting/webapp/accounting/common/creditcardfields.ftl
Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualCCTx.ftl
    ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/billsettings.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/ccinfo.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/optionsettings.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/paymentinformation.ftl
    ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl
    ofbiz/trunk/applications/party/widget/partymgr/PaymentMethodScreens.xml

Added: ofbiz/trunk/applications/accounting/webapp/accounting/common/creditcardfields.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/common/creditcardfields.ftl?view=auto&rev=565363
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/common/creditcardfields.ftl (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/common/creditcardfields.ftl Mon Aug 13 07:22:19 2007
@@ -0,0 +1,180 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#if !creditCard?has_content>
+    <#assign creditCard = requestParameters>
+</#if>
+
+<#if !paymentMethod?has_content>
+    <#assign paymentMethod = requestParameters>
+</#if>
+
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <input type="text" class="inputBox" size="30" maxlength="60" name="companyNameOnCard" value="${creditCard.companyNameOnCard?if_exists}"/>
+    </td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingPrefixCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <select name="titleOnCard" class="selectBox">
+        <option value="">${uiLabelMap.CommonSelectOne}</option>
+        <option<#if ((creditCard.titleOnCard)?default("") == "${uiLabelMap.CommonTitleMr}")> selected</#if>>${uiLabelMap.CommonTitleMr}</option>
+        <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> selected</#if>>${uiLabelMap.CommonTitleMrs}</option>
+        <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> selected</#if>>${uiLabelMap.CommonTitleMs}</option>
+        <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> selected</#if>>${uiLabelMap.CommonTitleDr}</option>
+      </select>
+    </td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingFirstNameCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)?if_exists}"/>
+    <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if></td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)?if_exists}"/>
+    </td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingLastNameCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)?if_exists}"/>
+    <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if></td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingSuffixCard}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <select name="suffixOnCard" class="selectBox">
+        <option value="">${uiLabelMap.CommonSelectOne}</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> selected</#if>>Jr.</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> selected</#if>>Sr.</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "I")> selected</#if>>I</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "II")> selected</#if>>II</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "III")> selected</#if>>III</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> selected</#if>>IV</option>
+        <option<#if ((creditCard.suffixOnCard)?default("") == "V")> selected</#if>>V</option>
+      </select>
+    </td>
+  </tr>
+
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardType}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <select name="cardType" class="selectBox">
+        <#if creditCard.cardType?exists>
+          <option>${creditCard.cardType}</option>
+          <option value="${creditCard.cardType}">---</option>
+        </#if>
+        ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
+      </select>
+    <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if></td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardNumber}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+        <#if creditCard?has_content>
+            <#if cardNumberMinDisplay?has_content>
+                <#-- create a display version of the card where all but the last four digits are * -->
+                <#assign cardNumberDisplay = "">
+                <#assign cardNumber = creditCard.cardNumber?if_exists>
+                <#if cardNumber?has_content>
+                    <#assign size = cardNumber?length - 4>
+                    <#if (size > 0)>
+                        <#list 0 .. size-1 as foo>
+                            <#assign cardNumberDisplay = cardNumberDisplay + "*">
+                        </#list>
+                        <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]>
+                    <#else>
+                        <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full -->
+                        <#assign cardNumberDisplay = cardNumber>
+                    </#if>
+                </#if>
+                <input type="text" class="required" size="20" maxlength="30" name="cardNumber" onfocus="javascript:this.value = '';" value="${cardNumberDisplay?if_exists}">
+            <#else>
+                <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${creditCard.cardNumber?if_exists}"/>
+            </#if>
+        <#else>
+            <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${creditCard.cardNumber?if_exists}"/>
+        </#if>
+    <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if></td>
+  </tr>
+  <#--<tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardSecurityCode}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+        <input type="text" class="inputBox" size="5" maxlength="10" name="cardSecurityCode" value="${creditCard.cardSecurityCode?if_exists}">
+    </td>
+  </tr>-->
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingExpirationDate}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <#assign expMonth = "">
+      <#assign expYear = "">
+      <#if creditCard?exists && creditCard.expireDate?exists>
+        <#assign expDate = creditCard.expireDate>
+        <#if (expDate?exists && expDate.indexOf("/") > 0)>
+          <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
+          <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
+        </#if>
+      </#if>
+      <select name="expMonth" class="selectBox">
+        <#if creditCard?has_content && expMonth?has_content>
+          <#assign ccExprMonth = expMonth>
+        <#else>
+          <#assign ccExprMonth = requestParameters.expMonth?if_exists>
+        </#if>
+        <#if ccExprMonth?has_content>
+          <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
+        </#if>
+        ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
+      </select>
+      <select name="expYear" class="selectBox">
+        <#if creditCard?has_content && expYear?has_content>
+          <#assign ccExprYear = expYear>
+        <#else>
+          <#assign ccExprYear = requestParameters.expYear?if_exists>
+        </#if>
+        <#if ccExprYear?has_content>
+          <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
+        </#if>
+        ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
+      </select>
+    <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if></td>
+  </tr>
+  <tr>
+    <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
+    <td width="5">&nbsp;</td>
+    <td width="74%">
+      <input type="text" class="inputBox" size="20" maxlength="30" name="description" value="${paymentMethod.description?if_exists}"/>
+    </td>
+  </tr>
+

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualCCTx.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualCCTx.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualCCTx.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualCCTx.ftl Mon Aug 13 07:22:19 2007
@@ -63,128 +63,8 @@
       </tr>
       <tr><td colspan="3"><hr></td></tr>
 
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingCompanyNameCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" size="30" maxlength="60" name="companyNameOnCard" value="${(creditCard.companyNameOnCard)?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingPrefixCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <select name="titleOnCard">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if ((creditCard.titleOnCard)?default("") == "Mr.")> checked</#if>>Mr.</option>
-          <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> checked</#if>>Mrs.</option>
-          <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> checked</#if>>Ms.</option>
-          <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> checked</#if>>Dr.</option>
-        </select>
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingFirstNameCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)?if_exists}">
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingMiddleNameCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingLastNameCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)?if_exists}">
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><b>${uiLabelMap.AccountingSuffixCard}</b></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <select name="suffixOnCard">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> checked</#if>>Jr.</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> checked</#if>>Sr.</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "I")> checked</#if>>I</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "II")> checked</#if>>II</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "III")> checked</#if>>III</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> checked</#if>>IV</option>
-          <option<#if ((creditCard.suffixOnCard)?default("") == "V")> checked</#if>>V</option>
-        </select>
-      </td>
-    </tr>
+      ${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
 
-      <tr>
-        <td width="26%" align="right" valign=middle><b>${uiLabelMap.AccountingCardType}</b></td>
-        <td width="5">&nbsp;</td>
-        <td width="74%">
-          <select name="cardType">
-            <#if ((creditCard.cardType)?exists)>
-              <option>${creditCard.cardType}</option>
-              <option value="${creditCard.cardType}">---</option>
-            </#if>
-            ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-          </select>
-        *</td>
-      </tr>
-      <tr>
-        <td width="26%" align="right" valign=middle><b>${uiLabelMap.AccountingCardNumber}</b></td>
-        <td width="5">&nbsp;</td>
-        <td width="74%">
-          <input type="text" size="20" maxlength="30" name="cardNumber" value="${(creditCard.cardNumber)?if_exists}">
-        *</td>
-      </tr>
-      <tr>
-        <td width="26%" align="right" valign=middle><b>${uiLabelMap.AccountingSecurityCodeCard}</b></td>
-        <td width="5">&nbsp;</td>
-        <td width="74%">
-          <input type="text" size="5" maxlength="10" name="cardSecurityCode" value="">
-        </td>
-      </tr>
-      <tr>
-        <td width="26%" align="right" valign=middle><b>${uiLabelMap.AccountingExpirationDate}</b></td>
-        <td width="5">&nbsp;</td>
-        <td width="74%">
-          <#assign expMonth = "">
-          <#assign expYear = "">
-          <#if creditCard?exists && creditCard.expireDate?exists>
-            <#assign expDate = creditCard.expireDate>
-            <#if (expDate?exists && expDate.indexOf("/") > 0)>
-              <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-              <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-            </#if>
-          </#if>
-          <select name="expMonth">
-            <#if creditCard?has_content && expMonth?has_content>
-              <#assign ccExprMonth = expMonth>
-            <#else>
-              <#assign ccExprMonth = requestParameters.expMonth?if_exists>
-            </#if>
-            <#if ccExprMonth?has_content>
-              <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
-            </#if>
-            ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-          </select>
-          <select name="expYear">
-            <#if creditCard?has_content && expYear?has_content>
-              <#assign ccExprYear = expYear>
-            <#else>
-              <#assign ccExprYear = requestParameters.expYear?if_exists>
-            </#if>
-            <#if ccExprYear?has_content>
-              <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
-            </#if>
-            ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-          </select>
-        *</td>
-      </tr>
       <tr><td colspan="3"><hr></td></tr>
 
       <#-- first / last name -->

Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Mon Aug 13 07:22:19 2007
@@ -333,4 +333,13 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="creditCardFields">
+        <section>
+            <widgets>
+                <platform-specific><html><html-template location="component://accounting/webapp/accounting/common/creditcardfields.ftl"/></html></platform-specific>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl Mon Aug 13 07:22:19 2007
@@ -33,130 +33,8 @@
       &nbsp;<a href="javascript:document.editcreditcardform.submit()" class="buttontext">${uiLabelMap.CommonSave}</a>
 
     <table width="90%" border="0" cellpadding="2" cellspacing="0">
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="30" maxlength="60" name="companyNameOnCard" value="${creditCardData.companyNameOnCard?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingPrefixCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <select name="titleOnCard" class="selectBox">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "${uiLabelMap.CommonTitleMr}")> checked</#if>>${uiLabelMap.CommonTitleMr}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Mrs.")> checked</#if>>${uiLabelMap.CommonTitleMrs}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Ms.")> checked</#if>>${uiLabelMap.CommonTitleMs}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Dr.")> checked</#if>>${uiLabelMap.CommonTitleDr}</option>
-        </select>
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingFirstNameCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCardData.firstNameOnCard)?if_exists}">
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCardData.middleNameOnCard)?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingLastNameCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCardData.lastNameOnCard)?if_exists}">
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingSuffixCard}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <select name="suffixOnCard" class="selectBox">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "Jr.")> checked</#if>>Jr.</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "Sr.")> checked</#if>>Sr.</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "I")> checked</#if>>I</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "II")> checked</#if>>II</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "III")> checked</#if>>III</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "IV")> checked</#if>>IV</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "V")> checked</#if>>V</option>
-        </select>
-      </td>
-    </tr>
 
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingCardType}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <select name="cardType" class="selectBox">
-          <option>${creditCardData.cardType?if_exists}</option>
-          <option></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-        </select>
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingCardNumber}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <#if creditCardData?has_content>
-          <#assign cardNumberDisplay = "">
-          <#assign cardNumber = creditCardData.cardNumber?if_exists>
-          <#if cardNumber?has_content>
-            <#assign size = cardNumber?length - 4>
-            <#list 0 .. size-1 as foo>
-              <#assign cardNumberDisplay = cardNumberDisplay + "*">
-            </#list>
-            <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]>
-          </#if>
-        </#if>
-        <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" onfocus="javascript:this.value = '';" value="${cardNumberDisplay?if_exists}">
-      *</td>
-    </tr>
-    <#--<tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingCardSecurityCode}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="5" maxlength="10" name="cardSecurityCode" value="${creditCardData.cardSecurityCode?if_exists}">
-      </td>
-    </tr>-->
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.AccountingExpirationDate}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <#assign expMonth = "">
-        <#assign expYear = "">
-        <#if creditCard?exists>
-          <#assign expDate = creditCard.expireDate>
-          <#if (expDate?exists && expDate.indexOf("/") > 0)>
-            <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-            <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-          </#if>
-        </#if>
-        <select name="expMonth" class="selectBox">
-          <option><#if tryEntity>${expMonth?if_exists}<#else>${requestParameters.expMonth?if_exists}</#if></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-        </select>
-        <select name="expYear" class="selectBox">
-          <option><#if tryEntity>${expYear?if_exists}<#else>${requestParameters.expYear?if_exists}</#if></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-        </select>
-      *</td>
-    </tr>
-    <tr>
-      <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
-      <td width="5">&nbsp;</td>
-      <td width="74%">
-        <input type="text" class="inputBox" size="30" maxlength="60" name="description" value="${paymentMethodData.description?if_exists}">
-      </td>
-    </tr>
+    ${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
     <tr>
       <td width="26%" align="right" valign="top"><div class="tabletext">${uiLabelMap.PartyBillingAddress}</div></td>
       <td width="5">&nbsp;</td>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/billsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/billsettings.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/billsettings.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/billsettings.ftl Mon Aug 13 07:22:19 2007
@@ -124,135 +124,7 @@
                 <td width="74%">&nbsp;</td>
               </tr>
 
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class='inputBox' size="30" maxlength="60" name="companyNameOnCard" value="${creditCard.companyNameOnCard?if_exists}">
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingPrefixCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="titleOnCard" class="selectBox">
-                    <option value="">Select One</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Mr.")> checked</#if>>${uiLabelMap.CommonTitleMr}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> checked</#if>>${uiLabelMap.CommonTitleMrs}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> checked</#if>>${uiLabelMap.CommonTitleMs}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> checked</#if>>${uiLabelMap.CommonTitleDr}</option>
-                  </select>
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingFirstNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)?if_exists}">
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)?if_exists}">
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingLastNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)?if_exists}">
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingSuffixCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="suffixOnCard" class="selectBox">
-                    <option value="">Select One</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> checked</#if>>Jr.</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> checked</#if>>Sr.</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "I")> checked</#if>>I</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "II")> checked</#if>>II</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "III")> checked</#if>>III</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> checked</#if>>IV</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "V")> checked</#if>>V</option>
-                  </select>
-                </td>
-              </tr>
-
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCardType}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="cardType" class="selectBox">
-                    <#if creditCard.cardType?exists>
-                      <option>${creditCard.cardType}</option>
-                      <option value="${creditCard.cardType}">---</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-                  </select>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCardNumber}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${creditCard.cardNumber?if_exists}">
-                *</td>
-              </tr>
-              <#--<tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCardSecurityCode}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" size="5" maxlength="10" name="cardSecurityCode" value="">
-                </td>
-              </tr>-->
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingExpirationDate}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <#assign expMonth = "">
-                  <#assign expYear = "">
-                  <#if creditCard?exists && creditCard.expireDate?exists>
-                    <#assign expDate = creditCard.expireDate>
-                    <#if (expDate?exists && expDate.indexOf("/") > 0)>
-                      <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-                      <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-                    </#if>
-                  </#if>
-                  <select name="expMonth" class='selectBox'>
-                    <#if creditCard?has_content && expMonth?has_content>
-                      <#assign ccExprMonth = expMonth>
-                    <#else>
-                      <#assign ccExprMonth = requestParameters.expMonth?if_exists>
-                    </#if>
-                    <#if ccExprMonth?has_content>
-                      <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-                  </select>
-                  <select name="expYear" class='selectBox'>
-                    <#if creditCard?has_content && expYear?has_content>
-                      <#assign ccExprYear = expYear>
-                    <#else>
-                      <#assign ccExprYear = requestParameters.expYear?if_exists>
-                    </#if>
-                    <#if ccExprYear?has_content>
-                      <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-                  </select>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="30" name="description" value="${creditCard.description?if_exists}">
-                </td>
-              </tr>
+              ${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
             </#if>
 
             <#-- eft fields -->

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/ccinfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/ccinfo.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/ccinfo.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/ccinfo.ftl Mon Aug 13 07:22:19 2007
@@ -21,125 +21,6 @@
   <#assign creditCard = requestParameters>
 </#if>
 <tr><td colspan="3"><hr class="sepbar"/></td></tr>
-<tr>
-  <td width="26%" align="right" valign="top"><div class="tableheadtext">${uiLabelMap.AccountingCreditCardInformation}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%"><input type="hidden" name="paymentMethodId" value="${parameters.paymentMethodId?if_exists}"/>&nbsp;</td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%"><input type="text" class='inputBox' size="30" maxlength="60" name="companyNameOnCard" value="${creditCard.companyNameOnCard?if_exists}"/></td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingPrefixCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-  <select name="titleOnCard" class="selectBox">
-    <option value="">Select One</option>
-    <option<#if ((creditCard.titleOnCard)?default("") == "Mr.")> selected</#if>>${uiLabelMap.CommonTitleMr}</option>
-    <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> selected</#if>>${uiLabelMap.CommonTitleMrs}</option>
-    <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> selected</#if>>${uiLabelMap.CommonTitleMs}</option>
-    <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> selected</#if>>${uiLabelMap.CommonTitleDr}</option>
-  </select>
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingFirstNameCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-    <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)?if_exists}"/>*
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-    <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)?if_exists}"/>
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingLastNameCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-    <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)?if_exists}"/>*
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingSuffixCard}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-    <select name="suffixOnCard" class="selectBox">
-      <option value="">Select One</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> selected</#if>>Jr.</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> selected</#if>>Sr.</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "I")> selected</#if>>I</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "II")> selected</#if>>II</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "III")> selected</#if>>III</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> selected</#if>>IV</option>
-      <option<#if ((creditCard.suffixOnCard)?default("") == "V")> selected</#if>>V</option>
-    </select>
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCardType}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-  <select name="cardType" class="selectBox">
-    <#if creditCard.cardType?exists>
-    <option>${creditCard.cardType}</option>
-    <option value="${creditCard.cardType}">---</option>
-    </#if>
-    ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-  </select>*
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingCardNumber}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%"><input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${creditCard.cardNumber?if_exists}"/>*</td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.AccountingExpirationDate}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-  <#assign expMonth = "">
-  <#assign expYear = "">
-  <#if creditCard?exists && creditCard.expireDate?exists>
-    <#assign expDate = creditCard.expireDate>
-    <#if (expDate?exists && expDate.indexOf("/") > 0)>
-      <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-      <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-    </#if>
-  </#if>
-  <select name="expMonth" class='selectBox'>
-    <#if creditCard?has_content && expMonth?has_content>
-      <#assign ccExprMonth = expMonth>
-    <#else>
-      <#assign ccExprMonth = requestParameters.expMonth?if_exists>
-    </#if>
-    <#if ccExprMonth?has_content>
-      <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
-    </#if>
-      ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-  </select>
-  <select name="expYear" class='selectBox'>
-    <#if creditCard?has_content && expYear?has_content>
-      <#assign ccExprYear = expYear>
-    <#else>
-      <#assign ccExprYear = requestParameters.expYear?if_exists>
-    </#if>
-    <#if ccExprYear?has_content>
-      <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
-    </#if>
-    ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-  </select>*
-  </td>
-</tr>
-<tr>
-  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
-  <td width="5">&nbsp;</td>
-  <td width="74%">
-    <input type="text" class="inputBox" size="20" maxlength="30" name="description" value="${creditCard.description?if_exists}"/>
-  </td>
-</tr>
+
+${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
+

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/optionsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/optionsettings.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/optionsettings.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/optionsettings.ftl Mon Aug 13 07:22:19 2007
@@ -32,7 +32,7 @@
                 <input type="radio" name="shipping_method" value="${shippingMethod}" <#if shippingMethod == chosenShippingMethod?default("N@A")>checked="checked"</#if>/>
               </td>
               <td valign="top">
-                <div class='tabletext'>
+                <div class="tabletext">
                     <#if shoppingCart.getShippingContactMechId()?exists>
                         <#assign shippingEst = shippingEstWpr.getShippingEstimate(carrierShipmentMethod)?default(-1)>
                     </#if>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/paymentinformation.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/paymentinformation.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/paymentinformation.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/paymentinformation.ftl Mon Aug 13 07:22:19 2007
@@ -116,135 +116,7 @@
                 <td width="74%">&nbsp;</td>
               </tr>
 
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="30" maxlength="60" name="companyNameOnCard" value="${creditCard.companyNameOnCard?if_exists}"/>
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingPrefixCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="titleOnCard" class="selectBox">
-                    <option value="">Select One</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Mr.")> selected</#if>>${uiLabelMap.CommonTitleMr}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> selected</#if>>${uiLabelMap.CommonTitleMrs}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> selected</#if>>${uiLabelMap.CommonTitleMs}</option>
-                    <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> selected</#if>>${uiLabelMap.CommonTitleDr}</option>
-                  </select>
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingFirstNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)?if_exists}"/>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)?if_exists}"/>
-                </td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingLastNameCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)?if_exists}"/>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingSuffixCard}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="suffixOnCard" class="selectBox">
-                    <option value="">Select One</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> selected</#if>>Jr.</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> selected</#if>>Sr.</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "I")> selected</#if>>I</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "II")> selected</#if>>II</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "III")> selected</#if>>III</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> selected</#if>>IV</option>
-                    <option<#if ((creditCard.suffixOnCard)?default("") == "V")> selected</#if>>V</option>
-                  </select>
-                </td>
-              </tr>
-
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardType}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <select name="cardType" class="selectBox">
-                    <#if creditCard.cardType?exists>
-                      <option>${creditCard.cardType}</option>
-                      <option value="${creditCard.cardType}">---</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-                  </select>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardNumber}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${creditCard.cardNumber?if_exists}"/>
-                *</td>
-              </tr>
-              <#--<tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingCardSecurityCode}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" size="5" maxlength="10" name="cardSecurityCode" value=""/>
-                </td>
-              </tr>-->
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.AccountingExpirationDate}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <#assign expMonth = "">
-                  <#assign expYear = "">
-                  <#if creditCard?exists && creditCard.expireDate?exists>
-                    <#assign expDate = creditCard.expireDate>
-                    <#if (expDate?exists && expDate.indexOf("/") > 0)>
-                      <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-                      <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-                    </#if>
-                  </#if>
-                  <select name="expMonth" class="selectBox">
-                    <#if creditCard?has_content && expMonth?has_content>
-                      <#assign ccExprMonth = expMonth>
-                    <#else>
-                      <#assign ccExprMonth = requestParameters.expMonth?if_exists>
-                    </#if>
-                    <#if ccExprMonth?has_content>
-                      <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-                  </select>
-                  <select name="expYear" class="selectBox">
-                    <#if creditCard?has_content && expYear?has_content>
-                      <#assign ccExprYear = expYear>
-                    <#else>
-                      <#assign ccExprYear = requestParameters.expYear?if_exists>
-                    </#if>
-                    <#if ccExprYear?has_content>
-                      <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
-                    </#if>
-                    ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-                  </select>
-                *</td>
-              </tr>
-              <tr>
-                <td width="26%" align="right" valign="middle"><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
-                <td width="5">&nbsp;</td>
-                <td width="74%">
-                  <input type="text" class="inputBox" size="20" maxlength="30" name="description" value="${creditCard.description?if_exists}"/>
-                </td>
-              </tr>
+              ${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
             </#if>
 
             <#-- eft fields -->

Modified: ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Mon Aug 13 07:22:19 2007
@@ -96,6 +96,7 @@
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleEditCreditCard"/>
+                <set field="cardNumberMinDisplay" value="min"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editpaymentmethod.bsh"/>
             </actions>
             <widgets>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl Mon Aug 13 07:22:19 2007
@@ -32,131 +32,11 @@
     </div>
   <input type="hidden" name="partyId" value="${partyId}"/>
   <table class="basic-table" cellspacing="0">
-    <tr>
-      <td class="label">${uiLabelMap.AccountingCompanyNameCard}</td>
-      <td>
-        <input type="text" size="30" maxlength="60" name="companyNameOnCard" value="${creditCardData.companyNameOnCard?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingPrefixCard}</td>
-      <td>
-        <select name="titleOnCard">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "${uiLabelMap.CommonTitleMr}")> checked</#if>>${uiLabelMap.CommonTitleMr}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Mrs.")> checked</#if>>${uiLabelMap.CommonTitleMrs}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Ms.")> checked</#if>>${uiLabelMap.CommonTitleMs}</option>
-          <option<#if (creditCardData.titleOnCard?default("") == "Dr.")> checked</#if>>${uiLabelMap.CommonTitleDr}</option>
-        </select>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingFirstNameCard}</td>
-      <td>
-        <input type="text" class="required" size="20" maxlength="60" name="firstNameOnCard" value="${(creditCardData.firstNameOnCard)?if_exists}">
-        <span class="tooltip">${uiLabelMap.CommonRequired}</span>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingMiddleNameCard}</td>
-      <td>
-        <input type="text" size="15" maxlength="60" name="middleNameOnCard" value="${(creditCardData.middleNameOnCard)?if_exists}">
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingLastNameCard}</td>
-      <td>
-        <input type="text" class="required" size="20" maxlength="60" name="lastNameOnCard" value="${(creditCardData.lastNameOnCard)?if_exists}">
-        <span class="tooltip">${uiLabelMap.CommonRequired}</span>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingSuffixCard}</td>
-      <td>
-        <select name="suffixOnCard">
-          <option value="">${uiLabelMap.CommonSelectOne}</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "Jr.")> checked</#if>>Jr.</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "Sr.")> checked</#if>>Sr.</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "I")> checked</#if>>I</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "II")> checked</#if>>II</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "III")> checked</#if>>III</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "IV")> checked</#if>>IV</option>
-          <option<#if (creditCardData.suffixOnCard?default("") == "V")> checked</#if>>V</option>
-        </select>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingCardType}</td>
-      <td>
-        <select name="cardType" class="required">
-          <option>${creditCardData.cardType?if_exists}</option>
-          <option></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
-        </select>
-        <span class="tooltip">${uiLabelMap.CommonRequired}</span>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.AccountingCardNumber}</td>
-      <td>
-        <#if creditCardData?has_content>
-          <#-- create a display version of the card where all but the last four digits are * -->
-          <#assign cardNumberDisplay = "">
-          <#assign cardNumber = creditCardData.cardNumber?if_exists>
-          <#if cardNumber?has_content>
-            <#assign size = cardNumber?length - 4>
-            <#if (size > 0)>
-              <#list 0 .. size-1 as foo>
-                <#assign cardNumberDisplay = cardNumberDisplay + "*">
-              </#list>
-              <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]>
-              <#else>
-                <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full -->
-                <#assign cardNumberDisplay = cardNumber>
-            </#if>
-          </#if>
-        </#if>
-        <input type="text" class="required" size="20" maxlength="30" name="cardNumber" onfocus="javascript:this.value = '';" value="${cardNumberDisplay?if_exists}">
-        <span class="tooltip">${uiLabelMap.CommonRequired}</span>
-      </td>
-    </tr>
-    <#--<tr>
-      <td class="label">${uiLabelMap.AccountingCardSecurityCode}</td>
-      <td>
-        <input type="text" size="5" maxlength="10" name="cardSecurityCode" value="${creditCardData.cardSecurityCode?if_exists}">
-      </td>
-    </tr>-->
-    <tr>
-      <td class="label">${uiLabelMap.AccountingExpirationDate}</td>        
-      <td>
-        <#assign expMonth = "">
-        <#assign expYear = "">
-        <#if creditCard?exists>
-          <#assign expDate = creditCard.expireDate>
-          <#if (expDate?exists && expDate.indexOf("/") > 0)>
-            <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
-            <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
-          </#if>
-        </#if>
-        <select name="expMonth" class="required">
-          <option><#if tryEntity>${expMonth?if_exists}<#else>${requestParameters.expMonth?if_exists}</#if></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
-        </select>
-        <select name="expYear" class="required">
-          <option><#if tryEntity>${expYear?if_exists}<#else>${requestParameters.expYear?if_exists}</#if></option>
-          ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
-        </select>
-        <span class="tooltip">${uiLabelMap.CommonRequired}</span>
-      </td>
-    </tr>
-    <tr>
-      <td class="label">${uiLabelMap.CommonDescription}</td>
-      <td>
-        <input type="text" size="30" maxlength="60" name="description" value="${paymentMethodData.description?if_exists}">
-      </td>
-    </tr>
+
+    ${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
     <tr>
       <td class="label">${uiLabelMap.AccountingBillingAddress}</td>
+      <td width="5">&nbsp;</td>
       <td>
         <#-- Removed because is confusing, can add but would have to come back here with all data populated as before...
         <a href="<@ofbizUrl>editcontactmech</@ofbizUrl>" class="smallSubmit">

Modified: ofbiz/trunk/applications/party/widget/partymgr/PaymentMethodScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PaymentMethodScreens.xml?view=diff&rev=565363&r1=565362&r2=565363
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PaymentMethodScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PaymentMethodScreens.xml Mon Aug 13 07:22:19 2007
@@ -59,7 +59,8 @@
             <actions>
                 <set field="titleProperty" value="PageTitleEditCreditCard"/>
                 <set field="tabButtonItem" value="editcreditcard"/>
-                
+                <set field="cardNumberMinDisplay" value="min"/>
+                <set field="showToolTip" value="true"/>
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.bsh"/>                
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/editpaymentmethod.bsh"/>                
             </actions>