diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 6b8126bd977..dadf7b476ee 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -676,6 +676,8 @@ else
print '
';
print load_fiche_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend"));
+ dol_fiche_head('');
+
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
@@ -714,7 +716,7 @@ else
print $formmail->get_form('addfile','removefile');
- print '
';
+ dol_fiche_end();
}
}
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index c33b798c3a9..f2e861ea932 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -433,7 +433,7 @@ class FormMail extends Form
}
else
{
- $out.= "| ".$langs->trans("MailFrom")." | ";
+ $out.= ' |
| '.$langs->trans("MailFrom")." | ";
$out.= $langs->trans("Name").':';
$out.= ' ';
$out.= $langs->trans("EMail").':<>';
@@ -441,42 +441,10 @@ class FormMail extends Form
}
}
- // Replyto
- if (! empty($this->withreplyto))
- {
- if ($this->withreplytoreadonly)
- {
- $out.= '';
- $out.= '';
- $out.= " |
| ".$langs->trans("MailReply")." | ".$this->replytoname.($this->replytomail?(" <".$this->replytomail.">"):"");
- $out.= " |
\n";
- }
- }
-
- // Errorsto
- if (! empty($this->witherrorsto))
- {
- //if (! $this->errorstomail) $this->errorstomail=$this->frommail;
- $errorstomail = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail);
- if ($this->witherrorstoreadonly)
- {
- $out.= '';
- $out.= '| '.$langs->trans("MailErrorsTo").' | ';
- $out.= $errorstomail;
- $out.= " |
\n";
- }
- else
- {
- $out.= '| '.$langs->trans("MailErrorsTo").' | ';
- $out.= '';
- $out.= " |
\n";
- }
- }
-
// To
if (! empty($this->withto) || is_array($this->withto))
{
- $out.= '| ';
+ $out.= ' |
| ';
if ($this->withtofree) $out.= $form->textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
else $out.= $langs->trans("MailTo");
$out.= ' | ';
@@ -604,6 +572,38 @@ class FormMail extends Form
$out.= " |
\n";
}
+ // Replyto
+ if (! empty($this->withreplyto))
+ {
+ if ($this->withreplytoreadonly)
+ {
+ $out.= '';
+ $out.= '';
+ $out.= "| ".$langs->trans("MailReply")." | ".$this->replytoname.($this->replytomail?(" <".$this->replytomail.">"):"");
+ $out.= " |
\n";
+ }
+ }
+
+ // Errorsto
+ if (! empty($this->witherrorsto))
+ {
+ //if (! $this->errorstomail) $this->errorstomail=$this->frommail;
+ $errorstomail = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail);
+ if ($this->witherrorstoreadonly)
+ {
+ $out.= '';
+ $out.= '| '.$langs->trans("MailErrorsTo").' | ';
+ $out.= $errorstomail;
+ $out.= " |
\n";
+ }
+ else
+ {
+ $out.= '| '.$langs->trans("MailErrorsTo").' | ';
+ $out.= '';
+ $out.= " |
\n";
+ }
+ }
+
// Ask delivery receipt
if (! empty($this->withdeliveryreceipt))
{
@@ -636,7 +636,7 @@ class FormMail extends Form
$defaulttopic=make_substitutions($defaulttopic,$this->substit);
$out.= '';
- $out.= '| '.$langs->trans("MailTopic").' | ';
+ $out.= ''.$langs->trans("MailTopic").' | ';
$out.= '';
if ($this->withtopicreadonly)
{
|