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=54a256fae3d194b3922856c9a46921951fd7a38d;p=working%2FEvergreen.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 Signed-off-by: Chris Sharp Signed-off-by: Kathy Lussier --- 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.