diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index db9725ce9f6..f8a31b239bb 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -617,25 +617,13 @@ if ($id)
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
- if ($id == 3) unset($fieldlist[2]);
-
if (empty($reshook))
{
- if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
- {
- fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide');
- }
- else
- {
- fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
- }
+ fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
}
print '
';
- if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
- {
- print '';
- }
+ print '';
print ' | ';
print "";
@@ -1134,16 +1122,11 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
}
elseif (in_array($fieldlist[$field], array('content')))
{
- if ($tabname == MAIN_DB_PREFIX.'c_email_templates')
- {
- print ' | | '; // To create an artificial CR for the current tr we are on
- }
- else print ' | ';
+ print ' | ';
if ($context != 'hide')
{
//print '';
$okforextended=true;
- if ($tabname == MAIN_DB_PREFIX.'c_email_templates' && empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended=false;
$doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_5, '90%');
print $doleditor->Create(1);
}
diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
index 70cbaeb7e04..287c3bb6aaa 100644
--- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
+++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
@@ -441,3 +441,4 @@ ALTER TABLE llx_extrafields MODIFY COLUMN list VARCHAR(128);
UPDATE llx_rights_def set module = 'asset' where module = 'assets';
+update llx_c_email_templates set lang = '' where lang IS NULL;
|