From c27260869b09652478578b0a689f410cec54cad7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Feb 2020 15:59:08 +0100 Subject: [PATCH] FIX #13046 More complete --- htdocs/core/class/html.formmail.class.php | 4 +++- htdocs/core/tpl/card_presend.tpl.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index abad66c8a73..b7e9c53a845 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -676,10 +676,12 @@ class FormMail extends Form } else { + // The free input of email if (!empty($this->withtofree)) { - $out .= 'withto) : "").'" />'; + $out .= 'withto) : "")).'" />'; } + // The select combo if (!empty($this->withto) && is_array($this->withto)) { if (!empty($this->withtofree)) $out .= " ".$langs->trans("and")."/".$langs->trans("or")." "; diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 1a9a046bf81..169b7753b92 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -188,7 +188,8 @@ if ($action == 'presend') } } - $formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste; + $formmail->withto = $liste; + $formmail->withtofree = (GETPOSTISSET('sendto') ? (GETPOST('sendto') ? GETPOST('sendto') : '1') : ''); $formmail->withtocc = $liste; $formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC; $formmail->withtopic = $topicmail;