Bug 10513: (follow-up) allow for multiline checkin alerts/messages
authorGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 17:33:55 +0000 (17:33 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 17:45:31 +0000 (17:45 +0000)
This patch turns the form input for the checkin message to
a text area and uses the html_line_break Template Toolkit filter
to display it.

To test:

[1] Create or edit an item type.  Note that the checkin message
    field is a text area.
[2] Enter a checkin message with at least one line break.
[3] In the item types administration page, note that the checkin
    message is displayed with the line break.
[4] Return an item of the item type modified in step 1.  Verify
    that the displayed checkin message includes the line break.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 7d8f781..bbb6923 100644 (file)
@@ -230,7 +230,7 @@ Item types administration
          </li>
       <li>
           <label for="checkinmsg">Check in message: </label>
-          <input type="text" id="checkinmsg" name="checkinmsg" size="48" value="[% checkinmsg %]" />
+          <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% checkinmsg %]</textarea>
       </li>
       <li>
           <label for="checkinmsgtype">Check in message type: </label>
@@ -323,7 +323,7 @@ Item types administration
       [% loo.rentalcharge %]
     [% END %]
     </td>
-    <td>[% loo.checkinmsg %]</td>
+    <td>[% loo.checkinmsg | html_line_break %]</td>
     <td>
       <a href="[% loo.script_name %]?op=add_form&amp;itemtype=[% loo.itemtype |html %]">Edit</a>
       <a href="[% loo.script_name %]?op=delete_confirm&amp;itemtype=[% loo.itemtype |html %]">Delete</a>
index 1ee9efe..1e2f875 100644 (file)
@@ -367,7 +367,7 @@ $(document).ready(function () {
     [% ELSE %]
         <div class="dialog message">
     [% END %]
-            <p class="problem">[% checkinmsg %]</p>
+            <p class="problem">[% checkinmsg | html_line_break %]</p>
         </div>
 [% END%]