From a541fb83f0d2e094f051cb6d40c0e132268dd170 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 30 Aug 2010 17:27:38 +0000 Subject: [PATCH] disallow self-check login w/ inactive barcode git-svn-id: svn://svn.open-ils.org/ILS/trunk@17390 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ec4ee8c68..6bc4c9e90 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -341,7 +341,16 @@ SelfCheckManager.prototype.loginPatron = function(barcode, passwd) { ); var evt = openils.Event.parse(this.patron); - if(evt) { + + // verify validity of the card used to log in + var inactiveCard = false; + if(!evt) { + var card = this.patron.cards().filter( + function(c) { return (c.barcode() == barcode); })[0]; + inactiveCard = !openils.Util.isTrue(card.active()); + } + + if(evt || inactiveCard) { this.handleAlert( dojo.string.substitute(localeStrings.LOGIN_FAILED, [barcode]), false, 'login-failure' -- 2.11.0