|
@@ -188,7 +188,7 @@ $tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX
|
|
|
$tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
|
|
$tabsql[23]= "SELECT t.rowid as rowid, t.taux, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
|
|
$tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
|
|
-$tabsql[25]= "SELECT rowid as rowid, label, type_template, private, position, topic, content, active FROM ".MAIN_DB_PREFIX."c_email_templates WHERE entity IN (".getEntity('email_template',1).")";
|
|
|
+$tabsql[25]= "SELECT rowid as rowid, label, type_template, private, position, topic, content_lines, content, active FROM ".MAIN_DB_PREFIX."c_email_templates WHERE entity IN (".getEntity('email_template',1).")";
|
|
|
$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
|
|
$tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
|
|
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
|
@@ -262,7 +262,7 @@ $tabfield[21]= "code,label";
|
|
|
$tabfield[22]= "code,label";
|
|
|
$tabfield[23]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
|
|
$tabfield[24]= "code,label";
|
|
|
-$tabfield[25]= "label,type_template,private,position,topic,content";
|
|
|
+$tabfield[25]= "label,type_template,private,position,topic,content_lines,content";
|
|
|
$tabfield[26]= "code,label,short_label";
|
|
|
$tabfield[27]= "code,libelle";
|
|
|
$tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
|
|
@@ -299,7 +299,7 @@ $tabfieldvalue[21]= "code,label";
|
|
|
$tabfieldvalue[22]= "code,label";
|
|
|
$tabfieldvalue[23]= "country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
|
|
$tabfieldvalue[24]= "code,label";
|
|
|
-$tabfieldvalue[25]= "label,type_template,private,position,topic,content";
|
|
|
+$tabfieldvalue[25]= "label,type_template,private,position,topic,content_lines,content";
|
|
|
$tabfieldvalue[26]= "code,label,short_label";
|
|
|
$tabfieldvalue[27]= "code,libelle";
|
|
|
$tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
|
|
@@ -336,7 +336,7 @@ $tabfieldinsert[21]= "code,label";
|
|
|
$tabfieldinsert[22]= "code,label";
|
|
|
$tabfieldinsert[23]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note";
|
|
|
$tabfieldinsert[24]= "code,label";
|
|
|
-$tabfieldinsert[25]= "label,type_template,private,position,topic,content,entity";
|
|
|
+$tabfieldinsert[25]= "label,type_template,private,position,topic,content_lines,content,entity";
|
|
|
$tabfieldinsert[26]= "code,label,short_label";
|
|
|
$tabfieldinsert[27]= "code,libelle";
|
|
|
$tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
|
|
@@ -449,7 +449,7 @@ $tabhelp[21] = array('code'=>$langs->trans("EnterAnyCode"));
|
|
|
$tabhelp[22] = array('code'=>$langs->trans("EnterAnyCode"));
|
|
|
$tabhelp[23] = array();
|
|
|
$tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
|
|
-$tabhelp[25] = array('topic'=>$langs->trans('SeeSubstitutionVars'),'content'=>$langs->trans('SeeSubstitutionVars'),'type_template'=>$langs->trans("TemplateForElement"),'private'=>$langs->trans("TemplateIsVisibleByOwnerOnly"), 'position'=>$langs->trans("PositionIntoComboList"));
|
|
|
+$tabhelp[25] = array('topic'=>$langs->trans('SeeSubstitutionVars'),'content'=>$langs->trans('SeeSubstitutionVars'),'content_lines'=>$langs->trans('SeeSubstitutionVars'),'type_template'=>$langs->trans("TemplateForElement"),'private'=>$langs->trans("TemplateIsVisibleByOwnerOnly"), 'position'=>$langs->trans("PositionIntoComboList"));
|
|
|
$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
|
|
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"));
|
|
|
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically"));
|
|
@@ -1062,6 +1062,7 @@ if ($id)
|
|
|
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
|
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
|
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
|
|
+ if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); }
|
|
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
|
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
|
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
|
@@ -1253,6 +1254,7 @@ if ($id)
|
|
|
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
|
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
|
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
|
|
+ if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); }
|
|
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
|
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
|
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
|
@@ -1770,6 +1772,24 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|
|
elseif (in_array($fieldlist[$field], array('libelle_facture'))) {
|
|
|
print '<td><textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea></td>';
|
|
|
}
|
|
|
+ elseif (in_array($fieldlist[$field], array('content_lines')))
|
|
|
+ {
|
|
|
+ if ($tabname == MAIN_DB_PREFIX.'c_email_templates')
|
|
|
+ {
|
|
|
+ print '<td colspan="4"></td></tr><tr class="pair nohover"><td colspan="5">'; // To create an artificial CR for the current tr we are on
|
|
|
+ }
|
|
|
+ else print '<td>';
|
|
|
+ if ($context != 'hide')
|
|
|
+ {
|
|
|
+ //print '<input type="text" size="100" class="flat" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
|
|
+ $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]}:''), '', 100, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_1, '90%');
|
|
|
+ print $doleditor->Create(1);
|
|
|
+ }
|
|
|
+ else print ' ';
|
|
|
+ print '</td>';
|
|
|
+ }
|
|
|
elseif (in_array($fieldlist[$field], array('content')))
|
|
|
{
|
|
|
if ($tabname == MAIN_DB_PREFIX.'c_email_templates')
|
|
@@ -1782,7 +1802,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|
|
//print '<textarea cols="3" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
|
|
|
$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%');
|
|
|
+ $doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_8, '90%');
|
|
|
print $doleditor->Create(1);
|
|
|
}
|
|
|
else print ' ';
|