From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Wed, 30 Sep 2009 14:41:53 +0000 (+0000) Subject: checkin options for Amnesty mode (void_overdues) and Suppress Holds and Transits... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b98d67a87d8266c8db07d992d030dbd4f17b9984;p=evergreen%2Fmasslnc.git 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 --- 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 @@ <!ENTITY staff.circ.checkin_overlay.trim_list.label "Trim List (20 rows)"> <!ENTITY staff.circ.checkin_overlay.strict_barcode.label "Strict Barcode"> <!ENTITY staff.circ.checkin_overlay.do_not_alert_on_precat.label "Ignore Pre-cataloged Items"> +<!ENTITY staff.circ.checkin_overlay.do_not_alert_on_precat.accesskey "I"> +<!ENTITY staff.circ.checkin_overlay.suppress_holds_and_transits.label "Suppress Holds and Transits"> +<!ENTITY staff.circ.checkin_overlay.suppress_holds_and_transits.accesskey "S"> +<!ENTITY staff.circ.checkin_overlay.amnesty_mode.label "Amnesty Mode / Forgive Fines"> +<!ENTITY staff.circ.checkin_overlay.amnesty_mode.accesskey "A"> <!ENTITY staff.circ.checkin_overlay.checkin_auto.label "Auto-Print Hold and Transit Slips"> <!ENTITY staff.circ.checkin_overlay.checkin_auto.accesskey "P"> <!ENTITY staff.circ.checkin_overlay.checkin_modifiers_btn.label "Checkin Modifiers"> 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"> <menupopup id="checkin_modifiers_popup"> - <menuitem type="checkbox" id="do_not_alert_on_precat" label="&staff.circ.checkin_overlay.do_not_alert_on_precat.label;" oils_persist="checked"/> - <menuitem type="checkbox" id="checkin_auto" label="&staff.circ.checkin_overlay.checkin_auto.label;" accesskey="&staff.circ.checkin_overlay.checkin_auto.accesskey;" oils_persist="checked"/> + <menuitem type="checkbox" id="do_not_alert_on_precat" oils_persist="checked" + label="&staff.circ.checkin_overlay.do_not_alert_on_precat.label;" accesskey="&staff.circ.checkin_overlay.do_not_alert_on_precat.accesskey;"/> + <menuitem type="checkbox" id="suppress_holds_and_transits" oils_persist="checked" + label="&staff.circ.checkin_overlay.suppress_holds_and_transits.label;" accesskey="&staff.circ.checkin_overlay.suppress_holds_and_transits.accesskey;"/> + <menuitem type="checkbox" id="amnesty_mode" oils_persist="checked" + label="&staff.circ.checkin_overlay.amnesty_mode.label;" accesskey="&staff.circ.checkin_overlay.amnesty_mode.accesskey;"/> + <menuitem type="checkbox" id="checkin_auto" oils_persist="checked" + label="&staff.circ.checkin_overlay.checkin_auto.label;" accesskey="&staff.circ.checkin_overlay.checkin_auto.accesskey;"/> </menupopup> </button> </hbox>