svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

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

svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

jleroux@apache.org
Author: jleroux
Date: Thu Dec  7 02:17:00 2006
New Revision: 483403

URL: http://svn.apache.org/viewvc?view=rev&rev=483403
Log:
A patch from Anil K Patel "Expire credit card years" (https://issues.apache.org/jira/browse/OFBIZ-188).

Modified:
    incubator/ofbiz/trunk/framework/common/webcommon/includes/ccyears.ftl
    incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml

Modified: incubator/ofbiz/trunk/framework/common/webcommon/includes/ccyears.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/webcommon/includes/ccyears.ftl?view=diff&rev=483403&r1=483402&r2=483403
==============================================================================
--- incubator/ofbiz/trunk/framework/common/webcommon/includes/ccyears.ftl (original)
+++ incubator/ofbiz/trunk/framework/common/webcommon/includes/ccyears.ftl Thu Dec  7 02:17:00 2006
@@ -14,12 +14,15 @@
 License for the specific language governing permissions and limitations
 under the License.
 -->
+<#assign stringYear = thisDate?string("yyyy")>
+<#assign thisYear = stringYear?number>
+
 <option></option>
-<option value="2005">2005</option>
-<option value="2006">2006</option>
-<option value="2007">2007</option>
-<option value="2008">2008</option>
-<option value="2009">2009</option>
-<option value="2010">2010</option>
-<option value="2011">2011</option>
-<option value="2012">2012</option>
+<option value="${thisYear}">${thisYear}</option>
+<option value="${thisYear + 1}">${thisYear + 1}</option>
+<option value="${thisYear + 2}">${thisYear + 2}</option>
+<option value="${thisYear + 3}">${thisYear + 3}</option>
+<option value="${thisYear + 4}">${thisYear + 4}</option>
+<option value="${thisYear + 5}">${thisYear + 5}</option>
+<option value="${thisYear + 6}">${thisYear + 6}</option>
+<option value="${thisYear + 7}">${thisYear + 7}</option>

Modified: incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml?view=diff&rev=483403&r1=483402&r2=483403
==============================================================================
--- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Thu Dec  7 02:17:00 2006
@@ -51,6 +51,9 @@
     </screen>
     <screen name="ccyears">
         <section>
+            <actions>
+                <set field="thisDate" from-field="nowTimestamp"/>
+            </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://common/webcommon/includes/ccyears.ftl"/></html></platform-specific>
             </widgets>