From ea05a77fc1999a53203770b3f47a8d6c19546348 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 29 Sep 2008 19:06:16 +0000 Subject: [PATCH] not necessary for expire/thaw dates to be in the future when editing other values on an existing hold 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 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index 748973711b..0cc9447105 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -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'); -- 2.43.2