diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 93e66c0c497..d6599f204f1 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -100,16 +100,18 @@ if ($action == 'add')
if ($result > 0)
{
+ setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
+
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
exit;
}
if ($result == 0)
{
- $mesg='
'.$langs->trans("WarningNoEMailsAdded").'
';
+ setEventMessage($langs->trans("WarningNoEMailsAdded"),'warnings');
}
if ($result < 0)
{
- $mesg=''.$langs->trans("Error").($obj->error?' '.$obj->error:'').'
';
+ setEventMessage($langs->trans("Error").($obj->error?' '.$obj->error:''),'errors');
}
}
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 6a49dd0865b..d803de28357 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -54,7 +54,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('mailingcard'));
-// Tableau des substitutions possibles
+// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
$object->substitutionarray=array(
'__ID__' => 'IdRecord',
'__EMAIL__' => 'EMail',
@@ -213,19 +213,20 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$tmpfield=explode('=',$other[2],2); $other3=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
$tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
$tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
+ // Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email,
- '__CHECK_READ__' => '
',
- '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'',
- '__MAILTOEMAIL__' => ''.$obj->email.'',
'__LASTNAME__' => $obj->lastname,
'__FIRSTNAME__' => $obj->firstname,
+ '__MAILTOEMAIL__' => ''.$obj->email.'',
'__OTHER1__' => $other1,
'__OTHER2__' => $other2,
'__OTHER3__' => $other3,
'__OTHER4__' => $other4,
- '__OTHER5__' => $other5
+ '__OTHER5__' => $other5,
+ '__CHECK_READ__' => '
',
+ '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").''
);
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
{
@@ -731,7 +732,7 @@ else
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
// on affiche donc juste un message
$mesgembedded.=''.$langs->trans("MailingNeedCommand").'
';
- $mesgembedded.='
';
+ $mesgembedded.='
';
$mesgembedded.='
'.$langs->trans("MailingNeedCommand2").'
';
$_GET["action"]='';
}
@@ -915,7 +916,11 @@ else
print '
';
}
- if (! empty($mesgembedded)) dol_htmloutput_mesg($mesgembedded,'','warning',1);
+ if (! empty($mesgembedded))
+ {
+ dol_htmloutput_mesg($mesgembedded,'','warning',1);
+ print '
';
+ }
// Affichage formulaire de TEST
if ($action == 'test')
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index e5a945ced78..71405a54feb 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -167,9 +167,9 @@ if ($resql)
print '