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
|
//Mail Model
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7979,7 +7979,7 @@ class Form
|
|||||||
* @param string $modelType Model type
|
* @param string $modelType Model type
|
||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
*/
|
*/
|
||||||
public function selectModelMail($prefix, $modelType = '')
|
public function selectModelMail($prefix, $modelType = '', $default = 0)
|
||||||
{
|
{
|
||||||
global $langs, $db, $user;
|
global $langs, $db, $user;
|
||||||
|
|
||||||
@ -7992,6 +7992,7 @@ class Form
|
|||||||
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
|
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1084,3 +1084,4 @@ MODIFYInDolibarr=Record %s modified
|
|||||||
DELETEInDolibarr=Record %s deleted
|
DELETEInDolibarr=Record %s deleted
|
||||||
VALIDATEInDolibarr=Record %s validated
|
VALIDATEInDolibarr=Record %s validated
|
||||||
APPROVEDInDolibarr=Record %s approved
|
APPROVEDInDolibarr=Record %s approved
|
||||||
|
DefaultMailModel=Default Mail Model
|
||||||
Loading…
Reference in New Issue
Block a user