From bd54f797fd380fc088b5bbdc88183064dc672330 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Fri, 22 Sep 2023 16:31:08 +0000
Subject: [PATCH] Bug 34891: Correct link on view restrictions button

This patch updates the button which appears on the circulation page
when a patron is restricted. Before this patch, clicking the button
would activate the restrictions tab but wouldn't scroll the page to make
the tab visible.

To test, apply the patch and check out to a patron who has one or more
restrictions.

- There should be a message on the page, "Restricted since..."
- Click the "View restrictions" button.
- The page should jump down so that the tabs are visible and the
  restrictions tab should be active.
- Test on the patron details page too.

Signed-off-by: David Nind <david@davidnind.com>
---
 koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
index 3a52c777c7..7320e3c07d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
@@ -74,7 +74,7 @@
                         [% END %]
                     </em><br/>
                 [% END %]
-                <a class="btn btn-xs btn-default" href="#reldebarments" onclick="$('#reldebarments-tab').click()"><i class="fa fa-ban"></i> View restrictions</a>
+                <a class="btn btn-xs btn-default" href="#reldebarments-tab" onclick="$('#reldebarments-tab').click()"><i class="fa fa-ban"></i> View restrictions</a>
 
                 [% IF (noissues && CAN_user_circulate_force_checkout && !moremember) %]
                     <span class="override_debarment">
-- 
2.30.2