From 59220c05e4070efc304a03bde1d61277eab66b49 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Thu, 5 Jul 2018 11:18:28 +0200 Subject: [PATCH] FIX : Select first mail model by default --- htdocs/core/class/html.formmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2fd38d097c0..0e2f9176492 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -299,7 +299,7 @@ class FormMail extends Form { $model_id=$this->param["models_id"]; } - $arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, ($model_id ? $model_id : -1)); // we set -1 if model_id empty + $arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); // If $model_id is empty, preselect the first one } //var_dump($this->param["models"]); //var_dump($model_id);