Fix popup message

This commit is contained in:
Laurent Destailleur 2022-07-13 14:00:19 +02:00
parent 05e9e922ab
commit 71045cbe83
3 changed files with 19 additions and 5 deletions

View File

@ -427,11 +427,15 @@ if ($action == 'edit') {
// Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';
$text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING];
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')];
if (empty($text)) {
$text = $langs->trans("Undefined").img_warning();
}
print $text;
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'default') {
print '<span class="opacitymedium">'.$text.'</span>';
} else {
print $text;
}
print '</td></tr>';
if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {

View File

@ -394,11 +394,15 @@ if ($action == 'edit') {
// Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';
$text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_TICKET];
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')];
if (empty($text)) {
$text = $langs->trans("Undefined").img_warning();
}
print $text;
if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'default') {
print '<span class="opacitymedium">'.$text.'</span>';
} else {
print $text;
}
print '</td></tr>';
if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {

View File

@ -808,7 +808,13 @@ if ($action == 'create') {
$linktoadminemailbefore = '<a href="'.DOL_URL_ROOT.'/admin/mails_emailing.php">';
$linktoadminemailend = '</a>';
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings');
$messagetoshow = $langs->trans("MailSendSetupIs2", '{s1}', '{s2}', '{s3}', '{s4}');
$messagetoshow = str_replace('{s1}', $linktoadminemailbefore, $messagetoshow);
$messagetoshow = str_replace('{s2}', $linktoadminemailend, $messagetoshow);
$messagetoshow = str_replace('{s3}', $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $messagetoshow);
$messagetoshow = str_replace('{s4}', $listofmethods['smtps'], $messagetoshow);
setEventMessages($messagetoshow, null, 'warnings');
if (!empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) {
setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
}