diff --git a/ChangeLog b/ChangeLog index 294c09a6997..68452e0ca4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ For users: - New: Some performance enhancements. - New: Can attach files onto trip and expenses modules. - New: Add option MAIN_PDF_TITLE_BACKGROUND_COLOR +- New: Can define a hierarchical responsible on user For developers: - System of menu managers has been rewritten to reduce code to do same things. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 28dee6f9383..dcf70443fd8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -994,7 +994,7 @@ class Form global $conf,$user,$langs; // If no preselected user defined, we take current user - if ($selected < -1 && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id; + if ((is_numeric($selected) && ($selected < -1 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id; // Permettre l'exclusion d'utilisateurs if (is_array($exclude)) $excludeUsers = implode("','",$exclude); @@ -1043,7 +1043,7 @@ class Form if ($num) { $out.= ''; print ''; print ''; print ''; - $rowspan=13; - if (! empty($conf->societe->enabled)) $rowspan++; if (! empty($conf->adherent->enabled)) $rowspan++; @@ -1693,21 +1707,6 @@ else print ''; } - // Multicompany - if (! empty($conf->multicompany->enabled)) - { - if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) - { - print "".''; - print "\n"; - } - else - { - print ''; - } - } - // Type print ''; print ''; - + // openid if (isset($conf->authmode) && preg_match('/myopenid/',$conf->authmode)) { @@ -1806,12 +1805,34 @@ else print ''; } + // Hierarchy + print ''; + print ''; + print "\n"; + // Statut print ''; print ''; - + + // Multicompany + if (! empty($conf->multicompany->enabled)) + { + if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + { + print "".''; + print "\n"; + } + else + { + print ''; + } + } + // Company / Contact if (! empty($conf->societe->enabled)) {
'.$langs->trans("Entity").'".$mc->select_entities($object->entity); - print "
'.$langs->trans("Type").''; @@ -1788,7 +1787,7 @@ else print ''; print ''; print '
'.$langs->trans("HierarchicalResponsible").''; + print $form->select_dolusers($object->fk_user,'fk_user',1,array($object->id)); + print '
'.$langs->trans("Status").''; print $object->getLibStatut(4); print '
'.$langs->trans("Entity").'".$mc->select_entities($object->entity); + print "