Debug v17

This commit is contained in:
Laurent Destailleur 2022-12-10 18:49:16 +01:00
parent ed734c3f5e
commit 74e580ce69

View File

@ -676,7 +676,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask');
$projectoktoentertime = 1;
if ($object->id > 0 && $object->statut == Project::STATUS_CLOSED) {
$projectoktoentertime = 0;
print '<div class="warning">';
$langs->load("errors");
print $langs->trans("WarningProjectClosed");
@ -684,6 +686,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
}
if ($object->id > 0 && $object->statut == Project::STATUS_DRAFT) {
$projectoktoentertime = 0;
print '<div class="warning">';
$langs->load("errors");
print $langs->trans("WarningProjectDraft");
@ -732,7 +735,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Project
print '<tr><td class="fieldrequired">'.$langs->trans("ChildOfProjectTask").'</td><td>';
print img_picto('', 'project');
$formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500 widthcentpercentminusxx');
if ($projectoktoentertime) {
$formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500 widthcentpercentminusxx');
} else {
$formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '', 'maxwidth500 widthcentpercentminusxx');
}
print '</td></tr>';
$contactsofproject = (empty($object->id) ? '' : $object->getListContactId('internal'));