checkin options for Amnesty mode (void_overdues) and Suppress Holds and Transits...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Sep 2009 14:41:53 +0000 (14:41 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Sep 2009 14:41:53 +0000 (14:41 +0000)
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
Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul

index 40f9156..79b5b22 100644 (file)
 <!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">
index 4e435d0..54c4159 100644 (file)
@@ -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);
                        }
index cb5b5a9..8c78a4f 100644 (file)
         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>