From af93fc74846f500b26c96a34b1b3729e0598ef19 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 26 Sep 2018 17:19:06 +0200 Subject: [PATCH] FIX: showOptionals: column mismatches --- htdocs/core/class/commonobject.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e9498d52d7d..47fabb6e2dc 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4524,7 +4524,7 @@ abstract class CommonObject { if (is_array($params) && count($params)>0) { if (array_key_exists('colspan',$params)) { - $colspan=$params['colspan']; + $colspan=$params['colspan'] - 1; } }else { $colspan='3'; @@ -4581,6 +4581,12 @@ abstract class CommonObject if($extrafields->attribute_required[$key]) $label = ''.$label.''; + if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + $out .= ' '; + $colspan--; + } + $out .= ''.$langs->trans($label).''; $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; $out .='';