From 54e42df886fdb116dfa8b3f582e4761c95e1628b Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Thu, 17 Oct 2019 14:22:37 -0400 Subject: [PATCH] Customization of self-check interface so that username, password, 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 --- Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 9ecd41df16..4b119f467c 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -353,7 +353,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({ @@ -372,6 +372,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'); } /** @@ -395,7 +397,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 @@ -528,8 +530,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) -- 2.11.0