Bug 14703: Holidays description shows \r\n for every new line
authorJoonas Kylmälä <j.kylmala@gmail.com>
Tue, 25 Aug 2015 07:24:54 +0000 (07:24 +0000)
committerMason James <mtj@kohaaloha.com>
Mon, 28 Sep 2015 12:03:31 +0000 (01:03 +1300)
Adds a new line for the holiday's description instead of the string
\r\n.

Test plan:
1. In tools -> Calendar look at some holiday's description
   (Do a new holiday with description of multiple lines if
   there is not already)
2. Notice that there is characters \r\n if someone has put
   a newline in the holiday's description
3. Apply patch
4. See that the new lines show there now nicely

Sponsored-by: Vaara-kirjastot

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended slightly: no need to replace title.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt

index f29944d..8e307ba 100644 (file)
@@ -517,7 +517,7 @@ td.repeatableyearly a.ui-state-default {  background:  #FFCC66 none; color :  Bl
 <tr>
   <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&amp;calendardate=[% HOLIDAYS_LOO.DATE %]"><span title="[% HOLIDAYS_LOO.DATE_SORT %]">[% HOLIDAYS_LOO.DATE %]</span></a></td>
   <td>[% HOLIDAYS_LOO.TITLE %]</td>
-  <td>[% HOLIDAYS_LOO.DESCRIPTION %]</td>
+  <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') %]</td>
 </tr>
   [% END %] 
 </tbody>