Bug 25468: Preserve line breaks in hold notes
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 12 May 2020 14:49:51 +0000 (10:49 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 15 May 2020 08:57:48 +0000 (09:57 +0100)
In a hold note, line breaks are not preserved when viewing the note. A
note like:
--
Test 1

Test 2
--

will be rendered as:
--
Test 1 Test 2
--

Test Plan:
1) Place a hold with a note, use line breaks in the note.
2) Note the lines all run together when viewing the hold.
3) Apply this patch.
4) Reload the page.
5) Notes should now display with the original line breaks!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc

index 919ccdd..a10e281 100644 (file)
                 [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
             </td>
 
-            <td>[% hold.notes | html %]</td>
+            <td>[% hold.notes | html | html_line_break %]</td>
             <td>
                 [% IF Koha.Preference('AllowHoldDateInFuture') %]
                     <input type="text" class="datepicker" value="[% hold.date | $KohaDates %]" required="required" size="10" name="reservedate" />