diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index f7f9d446d00acc957680cb82eacdda24f18864c8..affb977375dfba424c2d9658b268b1e124f4f102 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -143,6 +143,14 @@ VuFind.register('lightbox', function() { _refreshPage(); return; } + // Place Hold error isolation + if (obj.url.match(/\/Record/) && (obj.url.match(/Hold\?/) || obj.url.match(/Request\?/))) { + var error = $('<div/>').html(html).find('.flash-message.alert-danger'); + if (error.length) { + showAlert(error[0].innerHTML, 'danger'); + return false; + } + } if ( // Close the lightbox after deliberate login obj.method // is a form && ((obj.url.match(/MyResearch/) && !obj.url.match(/Bulk/)) // that matches login/create account