From 710a470e0bb1a320f60046facc8389b42ab9525b Mon Sep 17 00:00:00 2001 From: Aleisha Date: Wed, 1 Jul 2015 01:36:00 +0000 Subject: [PATCH] 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 Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 7098a36b19c35a06a51361bd381416a1204de38d) Signed-off-by: Chris Cormack Signed-off-by: Liz Rea Conflicts: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 8 ++++---- tools/letter.pl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index b6bdf88a7e..2c6f4dec58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -352,14 +352,14 @@ $(document).ready(function() {
  • [% IF letter.message_transport_type == 'sms' %] - [% IF letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters + [% IF letter.content && letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters [% END %] diff --git a/tools/letter.pl b/tools/letter.pl index aa7e0c385d..fa164bb7ff 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -251,7 +251,7 @@ sub add_form { $template->param( module => $module, branchloop => _branchloop($branchcode), - SQLfieldname => $field_selection, + SQLfieldnames => $field_selection, ); return; } -- 2.39.5
    - + [% FOREACH SQLfieldname IN SQLfieldnames %] + [% END %]