Event Reminder : Add "Default Mail Model" to select Mail Model

This commit is contained in:
atm-lena 2020-09-02 09:58:55 +02:00
parent e4557b3dd3
commit 7b91c8efc8
3 changed files with 5 additions and 3 deletions

View File

@ -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>';

View File

@ -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;
}

View File

@ -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