Event Reminder : Add "Default Mail Model" to select Mail Model
This commit is contained in:
parent
e4557b3dd3
commit
7b91c8efc8
@ -1221,7 +1221,7 @@ if ($action == 'create')
|
||||
|
||||
//Mail Model
|
||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
||||
print $form->selectModelMail('actioncommsend', 'actioncomm_send');
|
||||
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
@ -7979,7 +7979,7 @@ class Form
|
||||
* @param string $modelType Model type
|
||||
* @return string HTML select string
|
||||
*/
|
||||
public function selectModelMail($prefix, $modelType = '')
|
||||
public function selectModelMail($prefix, $modelType = '', $default = 0)
|
||||
{
|
||||
global $langs, $db, $user;
|
||||
|
||||
@ -7992,6 +7992,7 @@ class Form
|
||||
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
|
||||
|
||||
if ($result > 0) {
|
||||
if($default) $TModels[0] = $langs->trans('DefaultMailModel');
|
||||
foreach ($formmail->lines_model as $model){
|
||||
$TModels[$model->id] = $model->label;
|
||||
}
|
||||
|
||||
@ -1083,4 +1083,5 @@ CREATEInDolibarr=Record %s created
|
||||
MODIFYInDolibarr=Record %s modified
|
||||
DELETEInDolibarr=Record %s deleted
|
||||
VALIDATEInDolibarr=Record %s validated
|
||||
APPROVEDInDolibarr=Record %s approved
|
||||
APPROVEDInDolibarr=Record %s approved
|
||||
DefaultMailModel=Default Mail Model
|
||||
Loading…
Reference in New Issue
Block a user