[open-ils-commits] r17457 - branches/rel_2_0/Open-ILS/web/js/ui/default/circ/selfcheck (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 2 17:06:20 EDT 2010
Author: erickson
Date: 2010-09-02 17:06:14 -0400 (Thu, 02 Sep 2010)
New Revision: 17457
Modified:
branches/rel_2_0/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
Log:
back-porting: 17390 => disallow self-check login w/ inactive barcode
Modified: branches/rel_2_0/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2010-09-02 21:05:44 UTC (rev 17456)
+++ branches/rel_2_0/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2010-09-02 21:06:14 UTC (rev 17457)
@@ -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