Bug 14445: Silences warns in letter.tt

When creating a new notice, warn is triggered "Argument "" isn't numeric in numeric gt (>) at line 400". Same warn is triggered when changing Koha module option to any other module.

To test:
1) Go to Tools, then Notices & Slips
2) Click 'new notice'. Notice warn in intranet-error.log
3) Change Koha module to another module. Notice warn is triggered for every change
4) Apply patch and reload page
5) Change Koha module to another module. Notice there are no longer warns
6) Go back to Notices & Slips and click 'new notice' again. Notice there are no warns

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 7098a36b19)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Aleisha 2015-07-01 01:36:00 +00:00 committed by Chris Cormack
parent ff42841463
commit b0cf008cf2
2 changed files with 4 additions and 4 deletions

View File

@ -397,14 +397,14 @@ $(document).ready(function() {
<li>
<label for="SQLfieldname_[% letter.message_transport_type %]">Message body:</label>
[% IF letter.message_transport_type == 'sms' %]
<span id="sms_counter">[% IF letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span>
<span id="sms_counter">[% IF letter.content && letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span>
[% END %]
<table>
<tr>
<td>
<select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type %]" multiple="multiple" size="9">
[% FOREACH SQLfieldnam IN SQLfieldname %]
<option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
[% FOREACH SQLfieldname IN SQLfieldnames %]
<option value="[% SQLfieldname.value %]">[% SQLfieldname.text %]</option>
[% END %]
</select>
</td>

View File

@ -237,7 +237,7 @@ sub add_form {
$template->param(
module => $module,
branchloop => _branchloop($branchcode),
SQLfieldname => $field_selection,
SQLfieldnames => $field_selection,
);
return;
}