[open-ils-commits] r17042 - trunk/Open-ILS/web/templates/default/acq/financial (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jul 27 17:34:49 EDT 2010


Author: dbs
Date: 2010-07-27 17:34:43 -0400 (Tue, 27 Jul 2010)
New Revision: 17042

Modified:
   trunk/Open-ILS/web/templates/default/acq/financial/list_funds.tt2
Log:
Prevent years in "New Fund" dialog from being displayed with a comma separator

Also limit to a seemingly reasonable range of 2000 - 2200 for the year


Modified: trunk/Open-ILS/web/templates/default/acq/financial/list_funds.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/financial/list_funds.tt2	2010-07-27 21:27:24 UTC (rev 17041)
+++ trunk/Open-ILS/web/templates/default/acq/financial/list_funds.tt2	2010-07-27 21:34:43 UTC (rev 17042)
@@ -23,6 +23,14 @@
            showing tags */
         return link;
     }
+
+    function createNewFund() {
+        /* Set the display constraints before drawing the edit dialog;
+           introduce Y2K and Y2K2C problem */
+        lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
+        lfGrid.showCreateDialog();
+    }
+
 </script>
 
 <table style='width:100%;'>
@@ -31,7 +39,7 @@
         <td style='text-align:left;font-size:130%;font-weight: bold;'>Funds</td>
         <td style='text-align:right;width:90%;'>
 
-            <button dojoType='dijit.form.Button' onClick='lfGrid.showCreateDialog()'>New Fund</button>
+            <button dojoType='dijit.form.Button' onClick='createNewFund()'>New Fund</button>
             <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>Delete Selected</button>
 
             <div dojoType="dijit.form.DropDownButton">



More information about the open-ils-commits mailing list