From: Bob Wicksall Date: Mon, 6 Jun 2016 17:35:28 +0000 (-0400) Subject: LP#1528647 Self-check only accepts user name value if regex X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8fa59e94f4cf88e7851eafc5b544ddfb2aa25c20;p=evergreen%2Fpines.git 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 --- 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 edce285d48..2b0219cc72 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -333,8 +333,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.