Customization of self-check interface so that username, password,
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 17 Oct 2019 18:22:37 +0000 (14:22 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 20 Oct 2020 13:59:38 +0000 (09:59 -0400)
and barcode text banners appear in different colors in an effort
to make it clearer to patrons that they are being asked for a
different type of information.

Note that that this also tweaks the password check because the old
format was different from current master and no longer working correctly.

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

index aaeba96..a5aeb51 100644 (file)
@@ -349,7 +349,7 @@ SelfCheckManager.prototype.drawLoginPage = function() {
     var bcHandler = function(barcode_or_usrname) {
         // handle patron barcode/usrname entry
 
-        if(self.orgSettings[SET_PATRON_PASSWORD_REQUIRED] == 'True') {
+        if(self.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) {
             
             // password is required.  wire up the scan box to read it
             self.updateScanBox({
@@ -368,6 +368,8 @@ SelfCheckManager.prototype.drawLoginPage = function() {
         msg : localeStrings.PLEASE_LOGIN,
         handler : bcHandler
     });
+    /* PINES Customization: Change color of text instructions in banner for user name. */
+    dojo.style('oils-selfck-scan-text','background-color','#000');
 }
 
 /**
@@ -391,7 +393,7 @@ SelfCheckManager.prototype.loginPatron = function(barcode_or_usrname, passwd) {
         usrname = barcode_or_usrname;
     }
 
-    if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED] == 'True') {
+    if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) {
         
         if(!passwd) {
             // would only happen in dev/debug mode when using the patron= param
@@ -524,8 +526,12 @@ SelfCheckManager.prototype.updateScanBox = function(args) {
 
     if(args.password) {
         selfckScanBox.domNode.setAttribute('type', 'password');
+        /* PINES Customization: Change color of text instructions in banner for password. */
+        dojo.style('oils-selfck-scan-text','background-color','crimson');
     } else {
         selfckScanBox.domNode.setAttribute('type', '');
+        /* PINES Customization: Change color of text instructions in banner for barcodes. */
+        dojo.style('oils-selfck-scan-text','background-color','#E67E22');
     }
 
     if(args.value)