Bug 21552: Use raw filter for displaying RoutingListNote
authorKatrin Fischer <katrin.fischer.83@web.de>
Tue, 9 Oct 2018 12:22:35 +0000 (12:22 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 17 Oct 2018 12:27:07 +0000 (12:27 +0000)
The RoutingListNote system preference works like other prefs
allowing you to insert your own content on the routling list
template using HTML. The default text even uses HTML, so it
looks broken without this patch.

To test:
- Add a subscription
- Add a new routing list to it
- Add some patrons to it
- Save
- preview routing list
- Verify that the note shows and is formatted correctly.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt
serials/routing-preview.pl

index 98f7548..9caefcc 100644 (file)
@@ -1,3 +1,5 @@
+[% USE Koha %]
+[% USE raw %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials  &rsaquo; Routing slip preview</title>
@@ -30,7 +32,7 @@
 </table>
 
 <div id="routingnotes">
-    <p id="generalroutingnote">[% generalroutingnote | html %]</p>
+    <p id="generalroutingnote">[% Koha.Preference('RoutingListNote') | $raw %]</p>
     <p id="routingnote">[% routingnotes | html %]</p>
 </div>
 
index 015005c..85fc784 100755 (executable)
@@ -137,7 +137,6 @@ $template->param(
     subscriptionid => $subscriptionid,
     memberloop => $memberloop,
     routingnotes => $routingnotes,
-    generalroutingnote => C4::Context->preference('RoutingListNote'),
     hasRouting => check_routing($subscriptionid),
     (uc(C4::Context->preference("marcflavour"))) => 1
     );