diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 7a12f797913..5ce32767c4c 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -612,7 +612,18 @@ if ($action == 'create' && $user->rights->projet->creer) $array = array(); if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject"); if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject"); - print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + + if (count($array) > 0) { + print $form->selectarray('public', $array, GETPOSTISSET('public') ? GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + } else { + print ''; + + if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) { + print $langs->trans("PrivateProject"); + } else { + print $langs->trans("SharedProject"); + } + } print ''; // Date start @@ -886,11 +897,21 @@ if ($action == 'create' && $user->rights->projet->creer) $array = array(); if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject"); if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject"); - print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + + if (count($array) > 0) { + print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + } else { + print ''; + + if ($object->public == 0) { + print $langs->trans("PrivateProject"); + } else { + print $langs->trans("SharedProject"); + } + } print ''; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $classfortr = ($object->usage_opportunity ? '' : ' hideobject'); // Opportunity status print '