Merge pull request #14615 from atm-lena/FIX_selectModelMailFunction
selectModelMail() : if default and no mail models select default model
This commit is contained in:
commit
67e58f639f
@ -7992,8 +7992,8 @@ class Form
|
|||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
|
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
|
||||||
|
|
||||||
|
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
|
|
||||||
foreach ($formmail->lines_model as $model){
|
foreach ($formmail->lines_model as $model){
|
||||||
$TModels[$model->id] = $model->label;
|
$TModels[$model->id] = $model->label;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user