Bug 10513: (follow-up) allow for multiline checkin alerts/messages

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>
This commit is contained in:
Galen Charlton 2013-09-16 17:33:55 +00:00
parent 9dca7096c8
commit 04818401d7
2 changed files with 3 additions and 3 deletions

View 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>

View 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%]