This should prevent barcode scanners from auto-submitting on scan.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
<label for="hold_usr_is_requestor_not">
[% l("Place hold for patron by barcode:") %]
</label>
- <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" /><br />
+ <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" /><br />
<input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
<span>
<input type="radio" id="hold_usr_is_requestor"
Boolean(Number(input.value));
staff_hold_usr_barcode_changed();
}
+function no_hold_submit(event) {
+ if (event.which == 13) {
+ staff_hold_usr_barcode_changed();
+ return false;
+ }
+ return true;
+}
var cur_hold_barcode = undefined;
function staff_hold_usr_barcode_changed(isload) {
if(typeof xulG != 'undefined' && xulG.get_barcode_and_settings) {