Update html.form.class.php

This commit is contained in:
Laurent Destailleur 2020-08-29 04:55:24 +02:00 committed by GitHub
parent 9cd63d68bd
commit ca47eb2c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7971,6 +7971,13 @@ class Form
return $ret; return $ret;
} }
/**
* select_model_mail
*
* @param string $prefix Prefix
* @param string $modelType Model type
* @return string HTML select string
*/
public function select_model_mail($prefix, $modelType = '') { public function select_model_mail($prefix, $modelType = '') {
global $langs, $db, $user; global $langs, $db, $user;
@ -7984,11 +7991,9 @@ class Form
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs); $result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
if ($result > 0) { if ($result > 0) {
foreach ($formmail->lines_model as $model){ foreach ($formmail->lines_model as $model){
$TModels[$model->id] = $model->label; $TModels[$model->id] = $model->label;
} }
} }
$retstring .= '<select class="flat" id="select_'.$prefix.'model_mail" name="'.$prefix.'model_mail">'; $retstring .= '<select class="flat" id="select_'.$prefix.'model_mail" name="'.$prefix.'model_mail">';
@ -8000,7 +8005,6 @@ class Form
$retstring .= "</select>"; $retstring .= "</select>";
print $retstring; return $retstring;
return;
} }
} }