diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 6d621a7e101..3c3489185f4 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -444,9 +444,6 @@ if ($id) // Form to add a new line if ($tabname[$id]) { - $alabelisused = 0; - $var = false; - $fieldlist = explode(',', $tabfield[$id]); // Line for title @@ -481,7 +478,6 @@ if ($id) } print ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } print ''; @@ -612,7 +608,7 @@ if ($id) print ' '; } else { $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 53dfb1cd5f9..e3a39c5d8b1 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -438,8 +438,6 @@ if ($id) // Form to add a new line if ($tabname[$id]) { - $alabelisused = 0; - $fieldlist = explode(',', $tabfield[$id]); // Line for title @@ -496,7 +494,6 @@ if ($id) else print $valuetoshow; print ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } print ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index bb192f0a693..1d3e8bccdd7 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -407,8 +407,6 @@ if ($id) // Form to add a new line if ($tabname[$id]) { - $alabelisused = 0; - $fieldlist = explode(',', $tabfield[$id]); // Line for title @@ -437,7 +435,6 @@ if ($id) else print $valuetoshow; print ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index daf15552300..80398531515 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -236,7 +236,7 @@ $tabsqlsort[3] = "country ASC, code ASC"; $tabsqlsort[4] = "code ASC"; $tabsqlsort[5] = "label ASC"; $tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC"; -$tabsqlsort[7] = "country ASC, code ASC, a.libelle ASC"; +$tabsqlsort[7] = "c.label ASC, a.code ASC, a.libelle ASC"; $tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC"; $tabsqlsort[9] = "label ASC"; $tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC"; @@ -1069,6 +1069,7 @@ if ($id) elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code); elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code); elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code); + elseif ($search_code != '' && $id == 7) $sql .= natural_search("a.code", $search_code); elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code); if ($sortfield) @@ -1107,7 +1108,6 @@ if ($id) // Form to add a new line if ($tabname[$id]) { - $alabelisused = 0; $withentity = null; $fieldlist = explode(',', $tabfield[$id]); @@ -1214,7 +1214,6 @@ if ($id) else $tdsoffields .= $valuetoshow; $tdsoffields .= ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } if ($id == 4) $tdsoffields .= ''; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 0ca4be65910..3ebbd9300bc 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -435,9 +435,6 @@ if ($id) // Form to add a new line if ($tabname[$id]) { - $alabelisused = 0; - $var = false; - $fieldlist = explode(',', $tabfield[$id]); // Line for title @@ -461,7 +458,6 @@ if ($id) } else print $valuetoshow; print ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } print ''; @@ -469,7 +465,7 @@ if ($id) print ''; // Line to enter new values - print ""; + print ''; $obj = new stdClass(); // If data was already input, we define them in obj to populate input fields. @@ -570,7 +566,7 @@ if ($id) print ' '; } else { $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7858ea45993..84aa0d7950e 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -429,9 +429,7 @@ if (empty($reshook)) $object->note_public = (string) GETPOST("note_public", 'restricthtml'); $object->note_private = (string) GETPOST("note_private", 'restricthtml'); - if (GETPOSTISSET("roles")) { - $object->roles = GETPOST("roles", 'array'); - } + $object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 2e46105def7..94eb700ab92 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1763,14 +1763,14 @@ class Contact extends CommonObject if (count($this->roles) > 0) { foreach ($this->roles as $keyRoles => $valRoles) { $idrole = 0; - if (is_array($idrole)) { + if (is_array($valRoles)) { $idrole = $valRoles['id']; } else { $idrole = $valRoles; } $socid = 0; - if (is_array($idrole)) { + if (is_array($valRoles)) { $socid = $valRoles['socid']; } else { $socid = $this->socid; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b28b237bd90..1f6114d114e 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -670,6 +670,15 @@ textarea.centpercent { .nounderline { text-decoration: none; } +.nopadding { + padding: 0; +} +.nopaddingleft { + padding-left: 0; +} +.nopaddingright { + padding-right: 0; +} .paddingleft { padding-: 4px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 850d5561f66..f0e4d593f00 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -770,6 +770,15 @@ textarea.centpercent { .nounderline { text-decoration: none; } +.nopadding { + padding: 0; +} +.nopaddingleft { + padding-left: 0; +} +.nopaddingright { + padding-right: 0; +} .paddingleft { padding-: 4px; }