From f25837ab4a0a8aeeee7a3c2084a5fd7ced27fc31 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 23 May 2024 15:34:15 +0000 Subject: [PATCH] Bug 36950: Improve placement of catalog concern banner in the OPAC This patch changes the placement of the catalog concern banner in the OPAC. Changing the way it is added to the DOM will prevent it from obscuring content. To test, apply the patch and clear your browser cache if necessary. - In the staff interface, make sure the "OpacCatalogConcerns" system preference is enabled. - Locate a bibliographic record and view the detail page. - Click the "Report a concern" link in the sidebar. - Submit your concern. - When the concern is successfully submitted and the modal closes, the success banner ("Your concern was successfully submitted.") should appear below the breadcrumbs menu and above the biblio view tabs ("Normal view, "MARC view", etc.). Sponsored-By: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit 43a08f0f1e1035d8cef21e1b10a6ee8297d02e75) Signed-off-by: Lucas Gass (cherry picked from commit c2b54df8d5aecce6b05299d32a0af67a03848914) Signed-off-by: Fridolin Somers --- koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js index 5e3a4d77b4..486d2e8bb1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js @@ -52,12 +52,12 @@ $(document).ready(function() { $('#addConcernModal').modal('hide'); $('#concern_body').val(''); $('#concern_title').val(''); - $('h1:first').before('
' + __("Your concern was successfully submitted.") + '
'); + $('#catalogue_detail_biblio').prepend('
' + __("Your concern was successfully submitted.") + '
'); }, error: function(data) { $('#concern-submit-spinner').hide(); $('#addConcernModal').modal('hide'); - $('h1:first').before('
' + __("There was an error when submitting your concern, please contact a librarian.") + '
'); + $('#catalogue_detail_biblio').prepend('
' + __("There was an error when submitting your concern, please contact a librarian.") + '
'); }, contentType: "json" });