From b98d67a87d8266c8db07d992d030dbd4f17b9984 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 30 Sep 2009 14:41:53 +0000 Subject: [PATCH] checkin options for Amnesty mode (void_overdues) and Suppress Holds and Transits (noop) git-svn-id: svn://svn.open-ils.org/ILS/trunk@14221 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 5 +++ Open-ILS/xul/staff_client/server/circ/checkin.js | 41 +++++++++++++--------- .../staff_client/server/circ/checkin_overlay.xul | 10 ++++-- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 40f91568a6..79b5b22cc6 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1793,6 +1793,11 @@ + + + + + diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index 4e435d044b..54c4159567 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -315,29 +315,36 @@ circ.checkin.prototype = { var auto_print = document.getElementById('checkin_auto'); if (auto_print) auto_print = auto_print.getAttribute('checked') == 'true'; JSAN.use('circ.util'); + var params = { + 'barcode' : barcode, + 'disable_textbox' : function() { + obj.controller.view.checkin_barcode_entry_textbox.disabled = true; + obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'true'); + }, + 'enable_textbox' : function() { + obj.controller.view.checkin_barcode_entry_textbox.disabled = false; + obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'false'); + }, + 'checkin_result' : function(checkin) { + obj.controller.view.checkin_barcode_entry_textbox.disabled = false; + obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'false'); + obj.checkin2(checkin,backdate); + } + }; + var suppress_holds_and_transits = document.getElementById('suppress_holds_and_transits'); + if (suppress_holds_and_transits) suppress_holds_and_transits = suppress_holds_and_transits.getAttribute('checked') == 'true'; + if (suppress_holds_and_transits) params.noop = 1; + var amnesty_mode = document.getElementById('amnesty_mode'); + if (amnesty_mode) amnesty_mode = amnesty_mode.getAttribute('checked') == 'true'; + if (amnesty_mode) params.void_overdues = 1; circ.util.checkin_via_barcode( ses(), - { - 'barcode' : barcode, - 'disable_textbox' : function() { - obj.controller.view.checkin_barcode_entry_textbox.disabled = true; - obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'true'); - }, - 'enable_textbox' : function() { - obj.controller.view.checkin_barcode_entry_textbox.disabled = false; - obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'false'); - }, - 'checkin_result' : function(checkin) { - obj.controller.view.checkin_barcode_entry_textbox.disabled = false; - obj.controller.view.cmd_checkin_submit_barcode.setAttribute('disabled', 'false'); - obj.checkin2(checkin,backdate); - } - }, + params, backdate, auto_print ); } catch(E) { - obj.error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.exception', [E])); + obj.error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.exception', [E]), E); if (typeof obj.on_failure == 'function') { obj.on_failure(E); } diff --git a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul index cb5b5a96fe..8c78a4ff02 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul @@ -130,8 +130,14 @@ accesskey="&staff.circ.checkin_overlay.checkin_modifiers_btn.accesskey;" type="menu" allowevents="true"> - - + + + + -- 2.11.0