From: erickson Date: Mon, 31 Jul 2006 15:02:57 +0000 (+0000) Subject: added more detailed handling for barred patron hold placement failures X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=96b09edec1e4771fc5f8e95c56487f4801b0a0a0;p=Evergreen.git added more detailed handling for barred patron hold placement failures git-svn-id: svn://svn.open-ils.org/ILS/trunk@5180 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index 42af3df0da..9b5a6ba60e 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -537,6 +537,7 @@ function holdsCheckPossibility(pickuplib) { var type = holdArgs.type; var req = new Request(CHECK_HOLD_POSSIBLE, G.user.session, { titleid : rec, patronid : G.user.id(), depth : 0, pickup_lib : pickuplib } ); + req.request.alertEvent = false; req.send(true); return req.result(); } @@ -643,8 +644,17 @@ function holdsPlaceHold(hold, recurse) { swapCanvas($('check_holds_box')); if( holdArgs.type == 'M' || holdArgs.type == 'T' ) { - if( ! holdsCheckPossibility(hold.pickup_lib() ) ) { - alert($('hold_not_allowed').innerHTML); + var res = holdsCheckPossibility(hold.pickup_lib()); + if(!res || checkILSEvent(res) ) { + if(!res) { + alert($('hold_not_allowed').innerHTML); + } else { + if( res.textcode == 'PATRON_BARRED' ) { + alertId('hold_failed_patron_barred'); + } else { + alert($('hold_not_allowed').innerHTML); + } + } swapCanvas($('holds_box')); return; } diff --git a/Open-ILS/web/opac/skin/default/xml/common/holds.xml b/Open-ILS/web/opac/skin/default/xml/common/holds.xml index 2108d47830..578f958c2f 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/holds.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/holds.xml @@ -193,6 +193,12 @@ A hold already exists on the requested item. Would you like to create the hold anyway? + + PATRON BARRED. + Please see any notes in the notes section of your "My Account" page or contact your local library. + + +