Update html.form.class.php
This commit is contained in:
parent
9cd63d68bd
commit
ca47eb2c9f
@ -5683,7 +5683,7 @@ class Form
|
|||||||
|
|
||||||
$retstring .= '<select class="flat" id="select_'.$prefix.'type_duration" name="'.$prefix.'type_duration">';
|
$retstring .= '<select class="flat" id="select_'.$prefix.'type_duration" name="'.$prefix.'type_duration">';
|
||||||
|
|
||||||
foreach($TDurationTypes as $key=>$typeduration){
|
foreach ($TDurationTypes as $key=>$typeduration){
|
||||||
|
|
||||||
$retstring .= '<option value="'.$key.'"';
|
$retstring .= '<option value="'.$key.'"';
|
||||||
if($key == $selected)
|
if($key == $selected)
|
||||||
@ -7971,7 +7971,14 @@ class Form
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function select_model_mail($prefix, $modelType = ''){
|
/**
|
||||||
|
* select_model_mail
|
||||||
|
*
|
||||||
|
* @param string $prefix Prefix
|
||||||
|
* @param string $modelType Model type
|
||||||
|
* @return string HTML select string
|
||||||
|
*/
|
||||||
|
public function select_model_mail($prefix, $modelType = '') {
|
||||||
|
|
||||||
global $langs, $db, $user;
|
global $langs, $db, $user;
|
||||||
|
|
||||||
@ -7983,24 +7990,21 @@ class Form
|
|||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$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">';
|
||||||
|
|
||||||
foreach($TModels as $id_model=>$label_model){
|
foreach ($TModels as $id_model=>$label_model){
|
||||||
$retstring .= '<option value="'.$id_model.'"';
|
$retstring .= '<option value="'.$id_model.'"';
|
||||||
$retstring .= ">".$label_model."</option>";
|
$retstring .= ">".$label_model."</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$retstring .= "</select>";
|
$retstring .= "</select>";
|
||||||
|
|
||||||
print $retstring;
|
return $retstring;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user