diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index db19e943b4b..a8bbb05fb84 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -967,7 +967,7 @@ else
* Boutons d'action
*/
- if (GETPOST('cancel','alpha') || $confirm=='no' || $action == '' || in_array($action,array('settodraft', 'valid','delete','sendall','clone')))
+ if (GETPOST('cancel','alpha') || $confirm=='no' || $action == '' || in_array($action,array('settodraft','valid','delete','sendall','clone','test')))
{
print "\n\n
\n";
@@ -1071,7 +1071,9 @@ else
print '
';
print load_fiche_titre($langs->trans("TestMailing"));
- // Create l'objet formulaire mail
+ dol_fiche_head(null, '', '', -1);
+
+ // Create l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->fromname = $object->email_from;
@@ -1099,6 +1101,10 @@ else
print $formmail->get_form();
print '
';
+
+ dol_fiche_end();
+
+ print dol_set_focus('#sendto');
}
@@ -1114,7 +1120,7 @@ else
dol_fiche_head('', '', '', -1);
- print '
';
+ print '';
// Subject
print '| '.$langs->trans("MailTopic").' | '.$object->sujet.' |
';
@@ -1260,7 +1266,7 @@ else
dol_fiche_head(null, '', '', -1);
- print '';
+ print '';
// Subject
print '| '.$langs->trans("MailTopic").' | |
';
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 57af9f5c601..48949881659 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -260,7 +260,7 @@ if ($object->fetch($id) >= 0)
print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''), 'title_generic');
//print '';
- print '';
+ print '
';
//print '
';
print '';
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 4a04a04885a..8aa7f0ce54e 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -406,7 +406,7 @@ class FormMail extends Form
- $out.= '