diff --git a/module/VuFind/src/VuFind/Controller/RecordController.php b/module/VuFind/src/VuFind/Controller/RecordController.php index f986c0d2dc9c969c138a6081fe3c46fb81e31825..df0193af6dcc92bb9a5fca98be97aade23abf46f 100644 --- a/module/VuFind/src/VuFind/Controller/RecordController.php +++ b/module/VuFind/src/VuFind/Controller/RecordController.php @@ -128,6 +128,9 @@ class RecordController extends AbstractRecord if (isset($results['success']) && $results['success'] == true) { $this->flashMessenger()->setNamespace('info') ->addMessage('hold_place_success'); + if ($this->inLightbox()) { + return false; + } return $this->redirect()->toRoute('myresearch-holds'); } else { // Failure: use flash messenger to display messages, stay on diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js index e55ccec99bc3f90d322483c8b96f6925d6a75d8f..da43805e79bbf6f231947c97f3942b3048dc86cb 100644 --- a/themes/bootstrap/js/lightbox.js +++ b/themes/bootstrap/js/lightbox.js @@ -476,7 +476,9 @@ $(document).ready(function() { $('.placehold').click(function() { var params = deparam($(this).attr('href')); params.hashKey = params.hashKey.split('#')[0]; // Remove #tabnav - return getLightbox('Record', 'Hold', params, {}); + return getLightbox('Record', 'Hold', params, {}, function(op) { + document.location.href = path+'/MyResearch/Holds'; + }, false); }); // Save record links $('.save-record').click(function() {