[open-ils-commits] r17390 - trunk/Open-ILS/web/js/ui/default/circ/selfcheck (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 30 13:27:42 EDT 2010
Author: erickson
Date: 2010-08-30 13:27:38 -0400 (Mon, 30 Aug 2010)
New Revision: 17390
Modified:
trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
Log:
disallow self-check login w/ inactive barcode
Modified: trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2010-08-30 17:27:37 UTC (rev 17389)
+++ trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2010-08-30 17:27:38 UTC (rev 17390)
@@ -341,7 +341,16 @@
);
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'
More information about the open-ils-commits
mailing list