From: phasefx Date: Wed, 20 Oct 2010 20:15:01 +0000 (+0000) Subject: don't allow inactive cards with web-selfcheck X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7296fa1ec15ce6f68874462f04b29114d6c961ec;p=evergreen%2Fjoelewis.git don't allow inactive cards with web-selfcheck git-svn-id: svn://svn.open-ils.org/ILS/trunk@18423 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js index d8ab3de700..9b48c63729 100644 --- a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js @@ -224,6 +224,15 @@ function selfckPatronLogin(barcode) { $('selfck-patron-login-input').select(); return; } + for (var i =0; i < patron.cards().length; i++) { + if (patron.cards()[i].barcode() == barcode) { + if (!isTrue(patron.cards()[i].active())) { + unHideMe($('selfck-patron-not-found')); + $('selfck-patron-login-input').select(); + return; + } + } + } $('selfck-patron-login-input').value = ''; // reset the input hideMe($('selfck-patron-login-container'));