Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts: htdocs/admin/tools/export_files.php htdocs/comm/mailing/class/advtargetemailing.class.php htdocs/core/tpl/advtarget.tpl.php
This commit is contained in:
commit
df7cdd1da8
@ -173,7 +173,6 @@ if ($errormsg)
|
|||||||
setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors');
|
setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Redirect t backup page
|
// Redirect t backup page
|
||||||
header("Location: dolibarr_export.php");
|
header("Location: dolibarr_export.php");
|
||||||
|
|
||||||
|
|||||||
@ -423,24 +423,24 @@ if ($object->fetch($id) >= 0) {
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object, 'id', $linkback);
|
print $form->showrefnav($object, 'id', $linkback);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
print '<tr><td>'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from, 0, 0, 0, 0, 1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from, 0, 0, 0, 0, 1).'</td></tr>';
|
||||||
|
|
||||||
// Errors to
|
// Errors to
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
|
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="25%">'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
// Nb of distinct emails
|
// Nb of distinct emails
|
||||||
print '<tr><td width="25%">';
|
print '<tr><td>';
|
||||||
print $langs->trans("TotalNbOfDistinctRecipients");
|
print $langs->trans("TotalNbOfDistinctRecipients");
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
$nbemail = ($object->nbemail ? $object->nbemail : '0');
|
$nbemail = ($object->nbemail ? $object->nbemail : '0');
|
||||||
|
|||||||
@ -141,7 +141,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$sql .= " ".(!isset($this->filtervalue) ? 'NULL' : "'".$this->db->escape($this->filtervalue)."'").",";
|
$sql .= " ".(!isset($this->filtervalue) ? 'NULL' : "'".$this->db->escape($this->filtervalue)."'").",";
|
||||||
$sql .= " ".$user->id.",";
|
$sql .= " ".$user->id.",";
|
||||||
$sql .= " '".$this->db->idate(dol_now())."',";
|
$sql .= " '".$this->db->idate(dol_now())."',";
|
||||||
$sql .= " null";
|
$sql.= " ".$user->id;
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|||||||
@ -418,9 +418,10 @@ class FormAdvTargetEmailing extends Form
|
|||||||
* @param integer $selected defaut selected
|
* @param integer $selected defaut selected
|
||||||
* @param integer $showempty empty lines
|
* @param integer $showempty empty lines
|
||||||
* @param string $type_element Type element. Example: 'mailing'
|
* @param string $type_element Type element. Example: 'mailing'
|
||||||
|
* @param string $morecss More CSS
|
||||||
* @return string HTML combo
|
* @return string HTML combo
|
||||||
*/
|
*/
|
||||||
public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing')
|
public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing', $morecss = '')
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
@ -434,7 +435,7 @@ class FormAdvTargetEmailing extends Form
|
|||||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$out .= '<select id="'.$htmlname.'" class="flat" name="'.$htmlname.'">';
|
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'">';
|
||||||
if ($showempty)
|
if ($showempty)
|
||||||
$out .= '<option value=""></option>';
|
$out .= '<option value=""></option>';
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
|
|||||||
@ -48,7 +48,7 @@ function emailing_prepare_head(Mailing $object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR))
|
if ( empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR))
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id;
|
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans("MailAdvTargetRecipients");
|
$head[$h][1] = $langs->trans("MailAdvTargetRecipients");
|
||||||
|
|||||||
@ -58,24 +58,27 @@ print '<table class="border centpercent">'."\n";
|
|||||||
print '<tr>'."\n";
|
print '<tr>'."\n";
|
||||||
print '<td colspan="3" class="right">'."\n";
|
print '<td colspan="3" class="right">'."\n";
|
||||||
|
|
||||||
print '<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans('AdvTgtAddContact').'" class="butAction"/>'."\n";
|
print '<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans('AdvTgtAddContact').'" class="button"/>'."\n";
|
||||||
|
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('AdvTgtNameTemplate').'</td><td>';
|
print '<tr><td>'.$langs->trans('AdvTgtNameTemplate').'</td><td class="valignmiddle">';
|
||||||
if (!empty($template_id)) {
|
if (!empty($template_id)) {
|
||||||
$default_template = $template_id;
|
$default_template = $template_id;
|
||||||
} else {
|
} else {
|
||||||
$default_template = $advTarget->id;
|
$default_template = $advTarget->id;
|
||||||
}
|
}
|
||||||
print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element);
|
print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element, 'valignmiddle');
|
||||||
print '<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans('AdvTgtLoadFilter').'" class="butAction"/>';
|
print '<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans('AdvTgtLoadFilter').'" class="button"/>';
|
||||||
print '<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans('AdvTgtDeleteFilter').'" class="butAction"/>';
|
print '<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans('AdvTgtDeleteFilter').'" class="button"/>';
|
||||||
print '<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans('AdvTgtSaveFilter').'" class="butAction"/>';
|
print '<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans('AdvTgtSaveFilter').'" class="button"/>';
|
||||||
print $langs->trans('AdvTgtOrCreateNewFilter');
|
print '</td><td>' . "\n";
|
||||||
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
print '<tr><td>' . $langs->trans('AdvTgtOrCreateNewFilter') . '</td><td>';
|
||||||
print '<input type="text" name="template_name" id="template_name" value=""/>';
|
print '<input type="text" name="template_name" id="template_name" value=""/>';
|
||||||
print '<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans('AdvTgtCreateFilter').'" class="butAction"/>';
|
print '<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans('AdvTgtCreateFilter').'" class="button"/>';
|
||||||
print '</td><td>'."\n";
|
print '</td><td>'."\n";
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user