diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index e6cbad245d9..198a3910747 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -52,8 +52,12 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { $lastseparatorkeyfound = ''; $extrafields_collapse_num = ''; + $extrafields_collapse_num_old = ''; + $i = 0; foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { + $i++; + // Discard if extrafield is a hidden field on form $enabled = 1; @@ -65,6 +69,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { $enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1); } + $perms = 1; if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$key])) { @@ -87,6 +92,8 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] $value = $object->array_options["options_".$key]; //var_dump($key.' - '.$value); } + + // Print line tr of extra field if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') { $extrafields_collapse_num = ''; @@ -109,13 +116,20 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] } else { - print ''; + print ''; + $extrafields_collapse_num_old = $extrafields_collapse_num; print ''; print ''; print ''; - print '
attributes[$object->table_element]['required'][$key])) print ' fieldrequired'; print '">'; if (!empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $langs->trans($extrafields->attributes[$object->table_element]['help'][$key])); @@ -161,6 +175,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] //print 'x'.$object->array_options['options_' . $key].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); $value = isset($_POST["options_".$key]) ? dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]) : $datenotinstring; } + //TODO Improve element and rights detection if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $key) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 60c7ee43bb0..2f5e10c1459 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1751,7 +1751,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); /* border-bottom: 2px solid var(--colorbackhmenu1); */ } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { /* border-bottom: 2px solid var(--colorbackhmenu1) !important; */ border-bottom: 2px solid rgb() !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c7ce5709efd..da2df5eb788 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1799,7 +1799,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { border-bottom: 1px solid rgb() !important; } .tdhrthin {