From 54a256fae3d194b3922856c9a46921951fd7a38d 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 Signed-off-by: Kathy Lussier --- 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 3959fbca07..9182e440e5 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.43.2