diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 4e88348c6d0..d20a8d2785b 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -6450,9 +6450,12 @@ abstract class CommonObject
}
else
{
- $csstyle='';
$class=(!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : '');
+ $csstyle='';
if (is_array($params) && count($params)>0) {
+ if (array_key_exists('class', $params)) {
+ $class.=$params['class'].' ';
+ }
if (array_key_exists('style', $params)) {
$csstyle=$params['style'];
}
@@ -6489,16 +6492,19 @@ abstract class CommonObject
$labeltoshow = $langs->trans($label);
- $out .= '
attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
$out .= '">';
- if (! empty($extrafields->attributes[$object->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$object->table_element]['help'][$key]);
+ if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
else $out .= $labeltoshow;
$out .= ' | ';
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
+
$out .='';
+ /*for($ii = 0; $ii < ($colspan - 1); $ii++)
+ {
+ $out .='';
+ }*/
+
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= '';
else $out .= '';
$e++;
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index f427bb34f92..6bad5bb2ac5 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -375,7 +375,7 @@ if ($nolinesbefore) {
{
$coldisplay++;
?>
- "> |
+ "> |
- | |
+ |
showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var],'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
+ print $line->showOptionals($extrafieldsline, 'edit', array('class'=>'tredited', 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
}
?>