| '.$langs->trans("Signature").' | ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -531,7 +561,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
if (!empty($arrayfields['t.'.$key]['checked']))
{
print ' | ';
- if ($key == 'status') print $object->getLibStatut(5);
+ if ($key == 'status' || $key == 'active') print $object->getLibStatut(5);
else print $object->showOutputField($val, $key, $object->$key, '');
print ' | ';
if (!$i) $totalarray['nbfield']++;
@@ -550,14 +580,14 @@ while ($i < ($limit ? min($num, $limit) : $num))
print $hookmanager->resPrint;
// Action column
print '';
- $url = $_SERVER["PHP_SELF"].'?action=list&id='.$obj->rowid;
+ $url = $_SERVER["PHP_SELF"].'?id='.$obj->rowid;
if ($limit) $url .= '&limit='.urlencode($limit);
if ($page) $url .= '&page='.urlencode($page);
if ($sortfield) $url .= '&sortfield='.urlencode($sortfield);
if ($sortorder) $url .= '&page='.urlencode($sortorder);
- //print ''.img_edit().'';
+ print ''.img_edit().'';
//print ' ';
- print ''.img_delete().' ';
+ print ''.img_delete().' ';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected = 0;
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index bdd9f571123..83c8f583450 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
// Load translation files required by the page
$langs->loadLangs(array("errors", "admin", "mails", "languages"));
-$action = GETPOST('action', 'alpha') ?GETPOST('action', 'alpha') : 'view';
+$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view';
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$id = GETPOST('id', 'int');
@@ -410,13 +410,15 @@ if (empty($reshook))
$form = new Form($db);
$formadmin = new FormAdmin($db);
-llxHeader();
+$help_url = '';
+$title = $langs->trans("EMailsSetup");
+
+llxHeader('', $title);
-$titre = $langs->trans("EMailsSetup");
$linkback = '';
$titlepicto = 'title_setup';
-print load_fiche_titre($titre, $linkback, $titlepicto);
+print load_fiche_titre($title, $linkback, $titlepicto);
$head = email_admin_prepare_head();
diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php
index 25a0d2a25c5..7cf18ae4801 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -95,13 +95,12 @@ class EmailSenderProfile extends CommonObject
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>1),
'email' => array('type'=>'varchar(255)', 'label'=>'Email', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1),
- //'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
'private' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'User', 'visible'=>-1, 'enabled'=>1, 'position'=>50, 'default'=>'0', 'notnull'=>1),
'signature' => array('type'=>'text', 'label'=>'Signature', 'visible'=>3, 'enabled'=>1, 'position'=>400, 'notnull'=>-1, 'index'=>1,),
'position' => array('type'=>'integer', 'label'=>'Position', 'visible'=>1, 'enabled'=>1, 'position'=>405, 'notnull'=>-1, 'index'=>1,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
- 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')),
+ 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')),
);
/**
@@ -331,7 +330,7 @@ class EmailSenderProfile extends CommonObject
*/
public function getLibStatut($mode = 0)
{
- return $this->LibStatut($this->status, $mode);
+ return $this->LibStatut($this->active, $mode);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -346,31 +345,16 @@ class EmailSenderProfile extends CommonObject
{
global $langs;
- if ($mode == 0 || $mode == 1)
- {
- if ($status == 1) return $langs->trans('Enabled');
- elseif ($status == 0) return $langs->trans('Disabled');
- } elseif ($mode == 2)
- {
- if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled');
- elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled');
- } elseif ($mode == 3)
- {
- if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4');
- elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5');
- } elseif ($mode == 4)
- {
- if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled');
- elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled');
- } elseif ($mode == 5)
- {
- if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4');
- elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5');
- } elseif ($mode == 6)
- {
- if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4');
- elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5');
+ if ($status == 1) {
+ $label = $labelshort = $langs->trans('Enabled');
+ } else {
+ $label = $labelshort = $langs->trans('Disabled');
}
+
+ $statusType = 'status'.$status;
+ if ($status == self::STATUS_ENABLED) $statusType = 'status4';
+
+ return dolGetStatus($label, $labelshort, '', $statusType, $mode);
}
/**
|