[open-ils-commits] r10730 - trunk/Open-ILS/web/opac/skin/default/js

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 29 15:06:19 EDT 2008


Author: erickson
Date: 2008-09-29 15:06:16 -0400 (Mon, 29 Sep 2008)
New Revision: 10730

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/holds.js
Log:
not necessary for expire/thaw dates to be in the future when editing other values on an existing hold

Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js	2008-09-29 16:15:17 UTC (rev 10729)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js	2008-09-29 19:06:16 UTC (rev 10730)
@@ -854,10 +854,17 @@
 }
 
 /* verify that the thaw date is valid and after today */
-function holdsVerifyThawDate(dateString) {
+function holdsVerifyThawDate(dateString, isGreater) {
     thawDate = dojo.date.stamp.fromISOString(dateString);
-    if(thawDate && (dojo.date.compare(thawDate) > 0))
-        return dojo.date.stamp.toISOString(thawDate);
+    if(thawDate) {
+        if(isGreater) {
+            if(dojo.date.compare(thawDate) > 0) {
+                return dojo.date.stamp.toISOString(thawDate);
+            }
+        } else {
+            return dojo.date.stamp.toISOString(thawDate);
+        }
+    }
     return null;
 }
 
@@ -869,7 +876,7 @@
         return;
     }
 
-    if(!holdsVerifyThawDate(value)) {
+    if(!holdsVerifyThawDate(value, true)) {
         addCSSClass($(element), 'invalid_field');
     } else {
         removeCSSClass($(element), 'invalid_field');



More information about the open-ils-commits mailing list