From 991a70a60f7c4b5a33121a8b9c88614461759779 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Fri, 15 Apr 2016 15:45:19 -0400 Subject: [PATCH] Make place hold permission error checking more precise, so login fields still appear. --- themes/bootstrap3/js/lightbox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index affb977375d..dca70cad1ba 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -145,8 +145,9 @@ VuFind.register('lightbox', function() { } // 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) { + var testDiv = $('<div/>').html(html) + var error = testDiv.find('.flash-message.alert-danger'); + if (error.length && testDiv.find('.record').length) { showAlert(error[0].innerHTML, 'danger'); return false; } -- GitLab