From a2fa3a1719e8aec734cbd3d6a3b793349c1e163f Mon Sep 17 00:00:00 2001 From: Philip Orr Date: Thu, 18 Apr 2024 09:37:59 +0000 Subject: [PATCH] Bug 31097: Display restriction types This patch changes the display of patron restrictions in checkout and patron details pages to show the restriction type for each restriction. It also changes the display so each restriction is shown on a newline. To test: 1. Before applying patch, set system preference "PatronRestrictionTypes" to "Allow" 2. Go to Administration -> Patron restriction types 3. Add some restriction types, make sure you fill out both "Code" and "Label" 4. Go to any patron and add one or more of each restriction type 5. Go to that patron's checkout page 6. Notice that only the comments of the restrictions are displayed 7. Apply the patch 8. Reload the page 9. Notice the restriction types are now displayed correctly Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc | 4 +++- 1 file changed, 3 insertions(+), 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 f0d322b9fe..75c64cb695 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -70,7 +70,9 @@ [% IF debarredcomment.search('OVERDUES_PROCESS') %] Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %] [% ELSE %] - [% debarredcomment | $raw | html_line_break %] + [% FOR restriction IN patron.restrictions %] + [% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %]
+ [% END %] [% END %]
[% END %] -- 2.39.5