not necessary for expire/thaw dates to be in the future when editing other values...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Sep 2008 19:06:16 +0000 (19:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Sep 2008 19:06:16 +0000 (19:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10730 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/holds.js

index 7489737..0cc9447 100644 (file)
@@ -854,10 +854,17 @@ function holdsUpdate(hold, user) {
 }
 
 /* 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 @@ function holdsVerifyThawDateUI(element) {
         return;
     }
 
-    if(!holdsVerifyThawDate(value)) {
+    if(!holdsVerifyThawDate(value, true)) {
         addCSSClass($(element), 'invalid_field');
     } else {
         removeCSSClass($(element), 'invalid_field');