TPac: Invalidate 'current' barcode on invalid
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 13 Feb 2013 14:06:07 +0000 (09:06 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 13 Feb 2013 18:23:27 +0000 (13:23 -0500)
Hold placement should allow you to go back to the previous valid barcode.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Open-ILS/web/js/ui/default/opac/staff.js

index 22d6787..599db8c 100644 (file)
@@ -42,6 +42,7 @@ function staff_hold_usr_barcode_changed(isload) {
         }
         if(barcode == undefined || barcode == '') {
             document.getElementById('patron_name').innerHTML = '';
+            cur_hold_barcode = null;
             return;
         }
         if(barcode == cur_hold_barcode)
@@ -51,6 +52,7 @@ function staff_hold_usr_barcode_changed(isload) {
         var load_info = xulG.get_barcode_and_settings(window, barcode, only_settings);
         if(load_info == false || load_info == undefined) {
             document.getElementById('patron_name').innerHTML = '';
+            cur_hold_barcode = null;
             return;
         }
         cur_hold_barcode = load_info.barcode;