From 2707c0b89b9bcdb078d4e923c9f934884f77c60a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Nov 2020 20:13:42 +0100 Subject: [PATCH] Look and feel v13 --- htdocs/core/class/commonobject.class.php | 5 ++++- htdocs/core/class/html.form.class.php | 24 +++++++++++------------ htdocs/core/tpl/objectline_create.tpl.php | 4 +++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6127319d537..64cf44e10c1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6728,7 +6728,7 @@ abstract class CommonObject * @param array $params Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan) * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names) - * @param string $onetrtd All fields in same tr td (TODO field not used ?) + * @param string $onetrtd All fields in same tr td. Used by objectline_create.tpl.php for example. * @return string */ public function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0) @@ -6894,6 +6894,9 @@ abstract class CommonObject $helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]); $out .= ''; + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + $out .= ''; + } $out .= ''; $out .= $formproject->select_projects($socid, $selected, $htmlname, $maxlength, 0, 1, $discard_closed, $forcefocus, 0, 0, '', 1); - $out .= ''; + $out .= ''; $out .= ''; } else { if ($selected) @@ -4591,7 +4591,7 @@ class Form print ''; print ''; $this->select_conditions_paiements($selected, $htmlname, -1, $addempty); - print ''; + print ''; print ''; } else { if ($selected) @@ -4624,7 +4624,7 @@ class Form print ''; print ''; $this->selectAvailabilityDelay($selected, $htmlname, -1, $addempty); - print ''; + print ''; print ''; } else { if ($selected) @@ -4656,7 +4656,7 @@ class Form print ''; print ''; $this->selectInputReason($selected, $htmlname, -1, $addempty); - print ''; + print ''; print ''; } else { if ($selected) @@ -4705,7 +4705,7 @@ class Form $ret .= ''; $ret .= $this->selectDate($selected, $htmlname, $displayhour, $displaymin, 1, 'form'.$htmlname, 1, 0); $ret .= ''; - $ret .= ''; + $ret .= ''; $ret .= ''; } else { if ($displayhour) $ret .= dol_print_date($selected, 'dayhour'); @@ -4739,7 +4739,7 @@ class Form print ''; print ''; print $this->select_dolusers($selected, $htmlname, 1, $exclude, 0, $include); - print ''; + print ''; print ''; } else { if ($selected) @@ -4777,7 +4777,7 @@ class Form print ''; print ''; $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active); - print ''; + print ''; print ''; } else { if ($selected) @@ -4809,7 +4809,7 @@ class Form print ''; print ''; $this->selectTransportMode($selected, $htmlname, 2, $addempty, 0, 0, $active); - print ''; + print ''; print ''; } else { @@ -4842,7 +4842,7 @@ class Form print ''; print ''; print $this->selectMultiCurrency($selected, $htmlname, 0); - print ''; + print ''; print ''; } else { dol_include_once('/core/lib/company.lib.php'); @@ -4875,7 +4875,7 @@ class Form print ''; print ''; print ' '; - print ''; + print ''; print ''; } else { if (!empty($rate)) @@ -5008,7 +5008,7 @@ class Form print ''.$addcontact.''; } print ''; - print ''; + print ''; print ''; } else { if ($selected) @@ -5050,7 +5050,7 @@ class Form $out .= ''; $out .= ''; $out .= $this->select_company($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events); - $out .= ''; + $out .= ''; $out .= ''; } else { if ($selected) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index bc6f3313168..f028c00d704 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -419,7 +419,9 @@ if (is_object($objectline)) { if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required { print ''."\n"; - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''; } + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } print ''; $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));