diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index bd559fb96a3..b501ab7523b 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -484,24 +484,28 @@ if ($id > 0) print ''; print ''; if ($action == 'editlevel') + { $formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1); - else - print $object->getLibProspLevel(); - print ""; - print ''; - - // Status - $object->loadCacheOfProspStatus(); - print ''.$langs->trans("StatusProsp").''.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']); - print '     '; - print '
'; - foreach($object->cacheprospectstatus as $key => $val) - { - $titlealt='default'; - if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label']; - if ($object->stcomm_id != $val['id']) print ''.img_action($titlealt,$val['code']).''; - } - print '
'; + } + else + { + print $object->getLibProspLevel(); + } + print ""; + print ''; + + // Status + $object->loadCacheOfProspStatus(); + print ''.$langs->trans("StatusProsp").''.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']); + print '     '; + print '
'; + foreach($object->cacheprospectstatus as $key => $val) + { + $titlealt='default'; + if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label']; + if ($object->stcomm_id != $val['id']) print ''.img_action($titlealt,$val['code']).''; + } + print '
'; print ""; } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 35fcfb4c25b..bcff0981a70 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -138,7 +138,7 @@ class FormCompany */ function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0) { - global $langs; + global $user, $langs; print '
'; print ''; @@ -171,7 +171,7 @@ class FormCompany print Form::selectarray($htmlname, $options, $selected); } else dol_print_error($this->db); - + if (! empty($htmlname) && $user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''; print '
'; }