diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 6b8126bd97708e6f3089121a507b0357b1a088c6..dadf7b476eeb0c6ceb72a1135cbc8ec8db1faa82 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -676,6 +676,8 @@ else print '<div id="formmailbeforetitle" name="formmailbeforetitle"></div>'; 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 '<br>'; + dol_fiche_end(); } } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index c33b798c3a9e6e171875fd2391cce8a2c71d4b0b..f2e861ea932fad51c1028483f2d76a757ccc2248 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.= "<tr><td>".$langs->trans("MailFrom")."</td><td>"; + $out.= '<tr><td class="fieldrequired">'.$langs->trans("MailFrom")."</td><td>"; $out.= $langs->trans("Name").':<input type="text" id="fromname" name="fromname" size="32" value="'.$this->fromname.'" />'; $out.= ' '; $out.= $langs->trans("EMail").':<<input type="text" id="frommail" name="frommail" size="32" value="'.$this->frommail.'" />>'; @@ -441,42 +441,10 @@ class FormMail extends Form } } - // Replyto - if (! empty($this->withreplyto)) - { - if ($this->withreplytoreadonly) - { - $out.= '<input type="hidden" id="replyname" name="replyname" value="'.$this->replytoname.'" />'; - $out.= '<input type="hidden" id="replymail" name="replymail" value="'.$this->replytomail.'" />'; - $out.= "<tr><td>".$langs->trans("MailReply")."</td><td>".$this->replytoname.($this->replytomail?(" <".$this->replytomail.">"):""); - $out.= "</td></tr>\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.= '<input type="hidden" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />'; - $out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>'; - $out.= $errorstomail; - $out.= "</td></tr>\n"; - } - else - { - $out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>'; - $out.= '<input size="30" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />'; - $out.= "</td></tr>\n"; - } - } - // To if (! empty($this->withto) || is_array($this->withto)) { - $out.= '<tr><td width="180">'; + $out.= '<tr><td class="fieldrequired" width="180">'; if ($this->withtofree) $out.= $form->textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); else $out.= $langs->trans("MailTo"); $out.= '</td><td>'; @@ -604,6 +572,38 @@ class FormMail extends Form $out.= "</td></tr>\n"; } + // Replyto + if (! empty($this->withreplyto)) + { + if ($this->withreplytoreadonly) + { + $out.= '<input type="hidden" id="replyname" name="replyname" value="'.$this->replytoname.'" />'; + $out.= '<input type="hidden" id="replymail" name="replymail" value="'.$this->replytomail.'" />'; + $out.= "<tr><td>".$langs->trans("MailReply")."</td><td>".$this->replytoname.($this->replytomail?(" <".$this->replytomail.">"):""); + $out.= "</td></tr>\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.= '<input type="hidden" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />'; + $out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>'; + $out.= $errorstomail; + $out.= "</td></tr>\n"; + } + else + { + $out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>'; + $out.= '<input size="30" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />'; + $out.= "</td></tr>\n"; + } + } + // Ask delivery receipt if (! empty($this->withdeliveryreceipt)) { @@ -636,7 +636,7 @@ class FormMail extends Form $defaulttopic=make_substitutions($defaulttopic,$this->substit); $out.= '<tr>'; - $out.= '<td width="180">'.$langs->trans("MailTopic").'</td>'; + $out.= '<td class="fieldrequired" width="180">'.$langs->trans("MailTopic").'</td>'; $out.= '<td>'; if ($this->withtopicreadonly) {