From 68dff0c8ad05afa604d619b876a4799afbbd7e43 Mon Sep 17 00:00:00 2001 From: Bob Wicksall Date: Mon, 6 Jun 2016 13:35:28 -0400 Subject: [PATCH] LP#1528647 Self-check only accepts user name value if regex for barcode not set up This fix allows a patron to log into the self-check interface with either a barcode or a user name. Written by: Bob Wicksall Signed-off-by: Terran McCanna Signed-off-by: Chris Sharp --- Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js index a5aeb51525..8a614b0e54 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -331,8 +331,12 @@ SelfCheckManager.prototype.loadOrgSettings = function() { this.orgSettings[k] = settings[k].value; } - if(settings[SET_BARCODE_REGEX]) + if(settings[SET_BARCODE_REGEX]) { this.patronBarcodeRegex = new RegExp(settings[SET_BARCODE_REGEX].value); + } else { + this.patronBarcodeRegex = new RegExp(/^\d/); + // this assumes barcodes start with digits + } // Subtract the timeout warning interval from the configured timeout // so that when taken together they add up to the configured amount. -- 2.11.0