mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #17245 from Robin-Yann/13-fix-project-visibility-field
FIX: project visibility field with two option
This commit is contained in:
commit
6b542a89f6
|
|
@ -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 '<input type="hidden" name="public" id="public" value="'.(GETPOSTISSET('public') ? GETPOST('public') : $object->public).'">';
|
||||
|
||||
if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) {
|
||||
print $langs->trans("PrivateProject");
|
||||
} else {
|
||||
print $langs->trans("SharedProject");
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// 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 '<input type="hidden" id="public" name="public" value="'.$object->public.'">';
|
||||
|
||||
if ($object->public == 0) {
|
||||
print $langs->trans("PrivateProject");
|
||||
} else {
|
||||
print $langs->trans("SharedProject");
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
$classfortr = ($object->usage_opportunity ? '' : ' hideobject');
|
||||
// Opportunity status
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user