]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Checkout: further validation of due date override
authorDan Scott <dan@coffeecode.net>
Mon, 8 Oct 2012 19:08:47 +0000 (15:08 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 9 Oct 2012 17:57:44 +0000 (13:57 -0400)
commit1cb6a1ebb36d44985feca77d10c1848b838bd275
tree252a9a9aaec38142eaa2f47e5a3d62b80d10025c
parent09a85ef0dddb9bf05bff352b4b4bccfb219ee8c1
Checkout: further validation of due date override

The check_past() function failed if given a date that was not strictly
in YYYY-mm-dd format; interestingly, a common transposition typo such
as "0212-10-20" results in "212-10-20" getting passed to check_past(),
and therefore generating an invalid date. Throw an exception in
check_past() rather than returning true, because we are not in fact
stating that the due date is in the past - and catch the exception and
flag the due date override box accordingly in the checkout screen.

We could bubble the exception up to the user, but hopefully highlighting
the checkout box as being in an invalid state will catch the attention
of the users.

[LFW: Slightly amended a comment in OpenILS/WWW/EGCatLoader/Util.pm]

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/xul/staff_client/chrome/content/util/date.js
Open-ILS/xul/staff_client/server/circ/checkout.js