From ade61136ec2c8a78c90a4b013ccde973fc4d0566 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 --- 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 f0d322b9feb..75c64cb6950 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.44.0