From 165f64463b754f63d287c02222c266ffca60480a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Sep 2019 12:44:23 +0200 Subject: [PATCH] Fix look and feel v10 --- htdocs/core/class/commonobject.class.php | 19 +++++++++++++++---- htdocs/core/tpl/objectline_create.tpl.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) 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 .=''; + //$out .=''; switch($mode) { case "view": @@ -6511,6 +6517,11 @@ abstract class CommonObject $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); } ?>