From 10003fd23b380953f2c09d7d122c5d9b73a7214b Mon Sep 17 00:00:00 2001 From: David Busby Date: Wed, 1 Feb 2012 15:07:55 -0800 Subject: [PATCH 1/2] Update messages in the UI on possible duplicate checkout Updates the messsages, and some logic on which message to show during checkout Checkout to another patron, this patron for renew or this patron for today --- Open-ILS/xul/staff_client/server/circ/checkout.js | 12 ++++++++++++ .../server/locale/en-US/circ.properties | 4 ++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index ee4d317..07e3f29 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -912,6 +912,8 @@ circ.checkout.prototype = { } if (foreign_circ) { // OFFER CANCEL, NORMAL CHECKIN, AND POSSIBLY FORGIVING-BACKDATED CHECKIN + // Checkout of Identical Barcode by Different Patron + msg = document.getElementById('circStrings').getFormattedString('staff.circ.checkout.failed_to_another_patron', [ util.date.formatted_date( my_circ.create_time(), '%{localized_date}' ) ]); var r = obj.error.yns_alert( msg, document.getElementById('circStrings').getString('staff.circ.checkout.barcode.check_out_failed'), @@ -942,6 +944,16 @@ circ.checkout.prototype = { } } ); } else { + // @note This is where KCLS wants this to show more data, same person trying second checkout + msg = document.getElementById('circStrings').getString('staff.circ.checkout.failed_to_this_patron_renew'); + + // Date Check + var cko_d = util.date.formatted_date( my_circ.create_time(), '%{localized_date}' ); + var cur_d = util.date.formatted_date( new Date(), '%{localized_date}'); + if (cko_d == cur_d) { + msg = document.getElementById('circStrings').getString('staff.circ.checkout.failed_to_this_patron_today'); + } + var r = obj.error.yns_alert( msg, document.getElementById('circStrings').getString('staff.circ.checkout.barcode.check_out_failed'), diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 633c2df..6380a21 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -66,6 +66,10 @@ staff.circ.checkout.network_failure=There was a network failure. staff.circ.checkout.copy_status=Copy status = %1$s staff.circ.checkout.alert_message=Alert Message = %1$s staff.circ.checkout.permission_denied=Permission Denied = %1$s +# @note Added by edoceo for KCLS +staff.circ.checkout.failed_to_another_patron=This item was checked out by another patron on %1$s +staff.circ.checkout.failed_to_this_patron_renew=This copy is already checked out to this patron, do they need to renew? +staff.circ.checkout.failed_to_this_patron_today=This copy was already checked out to this patron today, duplicate? # "Circulation" - check &staff.main.menu.circ.label; in lang.dtd # "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd staff.circ.checkout.suggest_offline=Check Out Failed. If you wish to use the offline interface, in the top menubar select Circulation -> Offline Interface -- 1.7.3.4 From 13d86ac12ecebe929db677b8a01633cdd135ecc6 Mon Sep 17 00:00:00 2001 From: David Busby Date: Mon, 6 Feb 2012 18:08:20 -0800 Subject: [PATCH 2/2] Updated the message text --- .../server/locale/en-US/circ.properties | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 6380a21..fe2b8ce 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -68,8 +68,8 @@ staff.circ.checkout.alert_message=Alert Message = %1$s staff.circ.checkout.permission_denied=Permission Denied = %1$s # @note Added by edoceo for KCLS staff.circ.checkout.failed_to_another_patron=This item was checked out by another patron on %1$s -staff.circ.checkout.failed_to_this_patron_renew=This copy is already checked out to this patron, do they need to renew? -staff.circ.checkout.failed_to_this_patron_today=This copy was already checked out to this patron today, duplicate? +staff.circ.checkout.failed_to_this_patron_renew=This copy is already checked out to this patron. +staff.circ.checkout.failed_to_this_patron_today=This copy was already checked out to this patron today. # "Circulation" - check &staff.main.menu.circ.label; in lang.dtd # "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd staff.circ.checkout.suggest_offline=Check Out Failed. If you wish to use the offline interface, in the top menubar select Circulation -> Offline Interface -- 1.7.3.4