Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC...
authorKatrin Fischer <katrin.fischer.83@web.de>
Thu, 15 Aug 2019 10:59:46 +0000 (10:59 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 10:58:56 +0000 (10:58 +0000)
This patch makes 2 changes:
- bug 22702 allowed adding HTML to the circulation note, so this patch
  restores that ability.
- display OPAC note and messages as multi-line in OPAC

To test:
- Add a circulation and an OPAC note with line breaks and HTML tags
  to the patron account
- Add a message with line breaks to the patron account
- Check line breaks don't show on
  - OPAC > patron account > my summary page
  - Staff > patron account > details
- Apply patches
- Repeat test

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc

index df2569e..e309d79 100644 (file)
                                         [% IF ( patron.borrowernotes ) %]
                                             <li id="patron-borrowernotes">
                                                 <span class="label">Circulation note: </span><br />
-                                                [% patron.borrowernotes | html | html_line_break %]
+                                                [% patron.borrowernotes | $raw | html_line_break %]
                                             </li>
                                         [% END %]
 
index 39b6cfd..2dbf70d 100644 (file)
@@ -4,12 +4,12 @@
         <ul>
             [% FOREACH message IN patron_messages %]
                 <li>
-                    <strong>[% message.message | html %]</strong><br>
+                    <strong>[% message.message | html | html_line_break %]</strong><br>
                     &nbsp;&nbsp;&nbsp;<i>Written on [% message.message_date | $KohaDates %] by [% Branches.GetName(message.branchcode) | html %]</i>
                 </li>
             [% END %]
 
-            [% IF ( opacnote ) %]<li>[% opacnote | html %]</li>[% END %]
+            [% IF ( opacnote ) %]<li>[% opacnote | html | html_line_break %]</li>[% END %]
         </ul>
     </div>
 [% END %]