From: Pasi Kallinen Date: Wed, 17 Jul 2013 17:24:26 +0000 (+0300) Subject: Validate date ranges in Close Dates editor X-Git-Tag: sprint4-merge-nov22~2894 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e3e4461d6bf6f4d3b9309aa2f216102e29ac5b96;p=working%2FEvergreen.git Validate date ranges in Close Dates editor Complain in Closed Dates Editor when ending date is earlier than starting date. Signed-off-by: Pasi Kallinen Signed-off-by: Remington Steed Signed-off-by: Ben Shum --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index e9f9f1ccb1..b72b300ce7 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2173,6 +2173,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/admin/closed_dates.js b/Open-ILS/xul/staff_client/server/admin/closed_dates.js index 09c78bbf47..d784ff6627 100644 --- a/Open-ILS/xul/staff_client/server/admin/closed_dates.js +++ b/Open-ILS/xul/staff_client/server/admin/closed_dates.js @@ -357,6 +357,11 @@ function cdNew() { end = cdDateStrToDate(edate + ' ' + etime); } + if (end.getTime() < start.getTime()) { + alertId('cd_invalid_date_span'); + return; + } + cdCreate(start, end, $('cd_edit_note').value); } diff --git a/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml b/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml index 23299c1b16..c831f7d999 100644 --- a/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml @@ -225,6 +225,7 @@ &staff.server.admin.closed_dates.date.invalid; &staff.server.admin.closed_dates.time.invalid; &staff.server.admin.closed_dates.success; + &staff.server.admin.closed_dates.date_span.invalid;