fix: prededefault setup values for public field (visibility) works

This commit is contained in:
Florian HENRY 2022-03-16 09:36:52 +01:00
parent d71f117e81
commit cfa3f2f4a1

View File

@ -615,11 +615,11 @@ if ($action == 'create' && $user->rights->projet->creer) {
}
if (count($array) > 0) {
print $form->selectarray('public', $array, GETPOSTISSET('public') ? GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
print $form->selectarray('public', $array, GETPOST('public'), 0, 0, 0, '', 0, 0, 0, '', '', 1);
} else {
print '<input type="hidden" name="public" id="public" value="'.(GETPOSTISSET('public') ? GETPOST('public') : $object->public).'">';
print '<input type="hidden" name="public" id="public" value="'.GETPOST('public').'">';
if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) {
if (GETPOST('public') == 0) {
print $langs->trans("PrivateProject");
} else {
print $langs->trans("SharedProject");