From c4b8bac43fa2f5b2d42723533be80cc4bcfa8319 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 61f62f28a54..f12acbe1901 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1072,6 +1072,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); } @@ -1080,6 +1081,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, ""); } } @@ -1107,6 +1109,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 @@ -1510,7 +1513,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