PINES fix for self-check missing code
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 30 Dec 2021 17:39:45 +0000 (12:39 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 4 Jan 2022 16:30:38 +0000 (11:30 -0500)
This adds back code that is in master and was in rel_3_6_1, but was
missing in rel_3_8_0.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js

index a5aeb51..1e4ed08 100644 (file)
@@ -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.