From d70c70a5fe8bb71d2996fa2319a4745a7fdc3b80 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Aug 2022 19:40:47 +0200 Subject: [PATCH] FIX email not visible into combo list --- htdocs/core/class/html.formmail.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index df7408200a9..281cfaca58d 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1066,6 +1066,7 @@ class FormMail extends Form // multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time $tmparray = $this->withto; foreach ($tmparray as $key => $val) { + $tmparray[$key] = str_replace(array('<', '>'), array('(', ')'), $tmparray[$key]); $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } @@ -1074,6 +1075,7 @@ class FormMail extends Form if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action', 'aZ09') == 'presend') { $withtoselected = array_keys($tmparray); } + $out .= $form->multiselectarray("receiver", $tmparray, $withtoselected, null, null, 'inline-block minwidth500', null, ""); } } @@ -1101,6 +1103,7 @@ class FormMail extends Form // multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time $tmparray = $this->withtocc; foreach ($tmparray as $key => $val) { + $tmparray[$key] = str_replace(array('<', '>'), array('(', ')'), $tmparray[$key]); $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } $withtoccselected = GETPOST("receivercc", 'array'); // Array of selected value @@ -1504,7 +1507,7 @@ class FormMail extends Form /** - * Set substit array from object. This is call when suggesting the email template into forms before sending email. + * Set ->substit (and ->substit_line) array from object. This is call when suggesting the email template into forms before sending email. * * @param CommonObject $object Object to use * @param Translate $outputlangs Object lang