Only apply backspace-clears-barcode handling to the barcode input. As
it was, it was defaulting to all text inputs (e.g. stat cat values).
Signed-off-by: Bill Erickson <berickxx@gmail.com>
// when creating a new patron, a backspace in the barcode
// entry field clears the barcode and username values.
if (patron.isnew()) {
- dojo.connect(dojo.byId("barcode"), "onkeypress",
+ dojo.connect(widget.widget, "onKeyPress",
function(event) {
if (event.keyCode != 8) return // 8 = Backspace Key
findWidget('au', 'usrname').widget.attr('value', '');