From 4465931242fea8c5f9472471c3c7199761980e82 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 4 Oct 2024 09:26:49 +0100 Subject: [PATCH] Bug 38089: Move style to head and correct regular expression This patch moves the local style sections from the body to the head where they belong and it also updates the regular expression used to prepend the slip_id id to css selectors rather than replace them To test: 1 - Create a new notice in the 'Patron (custom slips)' module called 'Testing' 2 - Set print content as: Try the styling stuff. 3 - Set the 'Format' as: .styled {color:red;font-weight: bold;} 4 - Set system preference IntrnaetSlipPrinterJS to "//test" http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetSlipPrinterJS This will prevent auto printing popup 5 - Go to a patron and click Print -> Print Testing 6 - Note incorrect styling 7 - Apply patch, restart all 8 - Print Testing again 9 - Confirm styling is correct Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt index 3f24b22223..938c52f41e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -29,6 +29,9 @@ [% IF ( Koha.Preference('SlipCSS') ) %] [% END %] +[% FOR slip IN slips %] +[% IF slip.style %][% END %] +[% END %] [% INCLUDE 'slip-print.inc' #printThenClose %] @@ -39,7 +42,6 @@ [% SET slips = [{content => slip, is_html => !plain, style => style }] %] [% END %] [% FOR slip IN slips %] -[% IF slip.style %][% END %]
[% UNLESS slip.is_html %]
-- 
2.39.5