';
+ $text.=$langs->trans('ConfirmSendingEmailing').' ';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed','','',2);
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
if ($ret == 'html') print ' ';
}
}
@@ -756,21 +764,12 @@ else
if ($mesg) print $mesg;
- if ($_GET["action"] == 'sendall')
- {
- // Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
- // on affiche donc juste un message
- $message='
\n";
@@ -795,7 +794,7 @@ else
}
else
{
- print ''.$langs->trans("ValidMailing").'';
+ print ''.$langs->trans("ValidMailing").'';
}
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0181a09dcbc..dc8034ede73 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1791,11 +1791,12 @@ class Form
* @param formquestion an array with forms complementary inputs
* @param selectedchoice "" or "no" or "yes"
* @param useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
+ * @param height Force height of box
* @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
*/
- function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0)
+ function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=0)
{
- print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax);
+ print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height);
}
/**
@@ -1807,18 +1808,20 @@ class Form
* @param formquestion an array with forms complementary inputs
* @param selectedchoice "" or "no" or "yes"
* @param useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
+ * @param height Force height of box
* @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
*/
- function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0)
+ function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=0)
{
global $langs,$conf;
$more='';
$formconfirm='';
+ if (empty($height)) $height=170;
+
if ($formquestion)
{
- $more.='
'."\n";
$more.='
'."\n";
$more.='
'.$formquestion['text'].'
'."\n";
foreach ($formquestion as $key => $input)
@@ -1867,7 +1870,6 @@ class Form
}
}
$more.='
'."\n";
- $more.='
'."\n";
}
$formconfirm.= "\n\n";
@@ -1886,8 +1888,8 @@ class Form
jQuery("#dialog-confirm").dialog({
autoOpen: true,
resizable: false,
- height:170,
- width:590,
+ height:'.$height.',
+ width:600,
modal: true,
closeOnEscape: false,
close: function(event, ui) {
@@ -1921,7 +1923,12 @@ class Form
$formconfirm.= '
'.img_picto('','recent').' '.$title.'
'."\n";
// Ligne formulaire
- $formconfirm.= $more;
+ if ($more)
+ {
+ $formconfirm.='
'."\n";
+ $formconfirm.=$more;
+ $formconfirm.='
'."\n";
+ }
// Ligne message
$formconfirm.= '
';
diff --git a/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php b/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php
index 86e75b12550..bb1b6d5b802 100644
--- a/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php
+++ b/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php
@@ -112,7 +112,7 @@ class mailing_dolibarr_services_expired extends MailingTargets
$num = $this->db->num_rows($result);
$i = 0;
- dolibarr_syslog("dolibarr_services_expired.modules.php:add_to_target ".$num." targets found");
+ dolibarr_syslog(get_class($this)."::add_to_target ".$num." targets found");
$old = '';
while ($i < $num)
diff --git a/htdocs/includes/modules/mailings/fraise.modules.php b/htdocs/includes/modules/mailings/fraise.modules.php
index fb638de29a3..1e030a78072 100644
--- a/htdocs/includes/modules/mailings/fraise.modules.php
+++ b/htdocs/includes/modules/mailings/fraise.modules.php
@@ -139,6 +139,7 @@ class mailing_fraise extends MailingTargets
{
global $langs,$_POST;
$langs->load("members");
+ $langs->load("companies");
$cibles = array();
$now=dol_now();
@@ -149,7 +150,7 @@ class mailing_fraise extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
$sql.= " a.nom as name, a.prenom as firstname,";
- $sql.= " a.datefin"; // Other fields
+ $sql.= " a.datefin, a.civilite, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.email IS NOT NULL";
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
@@ -162,7 +163,7 @@ class mailing_fraise extends MailingTargets
//print $sql;
// Add targets into table
- dol_syslog("fraise.modules.php sql=".$sql);
+ dol_syslog(get_class($this)."::add_to_target sql=".$sql);
$result=$this->db->query($sql);
if ($result)
{
@@ -183,7 +184,10 @@ class mailing_fraise extends MailingTargets
'fk_contact' => $obj->fk_contact,
'name' => $obj->name,
'firstname' => $obj->firstname,
- 'other' => $obj->datefin?($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')):'',
+ 'other' => ($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')).';'.
+ ($langs->transnoentities("Civility").'='.$obj->civilite).';'.
+ ($langs->transnoentities("Login").'='.$obj->login).';'.
+ ($langs->transnoentities("Company").'='.$obj->societe),
'source_url' => $this->url($obj->id),
'source_id' => $obj->id,
'source_type' => 'member'
diff --git a/htdocs/includes/modules/mailings/framboise.modules.php b/htdocs/includes/modules/mailings/framboise.modules.php
index 555247dbacb..84c62b14cee 100644
--- a/htdocs/includes/modules/mailings/framboise.modules.php
+++ b/htdocs/includes/modules/mailings/framboise.modules.php
@@ -161,6 +161,7 @@ class mailing_framboise extends MailingTargets
global $conf, $langs;
$langs->load("companies");
+ $langs->load("categories");
$s='';
$s.='