From e0a9cbd8a4446bb771d0a8104aa5e58e8da1dd60 Mon Sep 17 00:00:00 2001 From: Bin Wen Date: Mon, 7 Oct 2019 09:01:39 -0400 Subject: [PATCH] Bug 23762: Editing is_html status of email template fails under multi-languages To test: 1.Enable multi-languages 2.Set the preference 'TranslateNotices' on 'Allow' 3.Go to: tools==>Notices & slips==>Edit (one notice) 4.Click on the "Email" in the Default, uncheck the checkbox for 'HTML Messages'. 5.Save 6.Reopen the notice, nothing changed. 7.Apply the patch 8.Repeat the steps 4 and 5 9.Success. Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 4 ++-- tools/letter.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 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 c394f80219..0845c45b12 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -416,9 +416,9 @@ [% IF letter.is_html %] - + [% ELSE %] - + [% END %]
  • diff --git a/tools/letter.pl b/tools/letter.pl index a673fa96a9..2c5481e6cd 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -290,10 +290,10 @@ sub add_validate { my @content = $input->multi_param('content'); my @lang = $input->multi_param('lang'); for my $mtt ( @mtt ) { - my $is_html = $input->param("is_html_$mtt"); + my $lang = shift @lang; + my $is_html = $input->param("is_html_$mtt\_$lang"); my $title = shift @title; my $content = shift @content; - my $lang = shift @lang; my $letter = C4::Letters::getletter( $oldmodule, $code, $branchcode, $mtt, $lang ); # getletter can return the default letter even if we pass a branchcode -- 2.39.5