';
-
- $defaultref = '';
- $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
- if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php"))
- {
- require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php';
- $modTask = new $obj;
- $defaultref = $modTask->getNextValue($object->thirdparty, null);
- }
-
- if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = '';
-
- // Ref
- print '| '.$langs->trans("Ref").' | ';
- if (empty($duplicate_code_error))
- {
- print (GETPOSTISSET("ref") ?GETPOST("ref", 'alpha') : $defaultref);
- } else {
- print $defaultref;
- }
- print '';
- print ' |
';
-
- print '| '.$langs->trans("Label").' | ';
- print '';
- print ' |
';
-
- // List of projects
- print '| '.$langs->trans("ChildOfProjectTask").' | ';
- print $formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500');
- print ' |
';
-
- print '| '.$langs->trans("AffectedTo").' | ';
- $contactsofproject = (!empty($object->id) ? $object->getListContactId('internal') : '');
- if (is_array($contactsofproject) && count($contactsofproject))
- {
- print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300');
- } else {
- print $langs->trans("NoUserAssignedToTheProject");
- }
- print ' |
';
-
- // Date start
- print '| '.$langs->trans("DateStart").' | ';
- print $form->selectDate(($date_start ? $date_start : ''), 'dateo', 1, 1, 0, '', 1, 1);
- print ' |
';
-
- // Date end
- print '| '.$langs->trans("DateEnd").' | ';
- print $form->selectDate(($date_end ? $date_end : -1), 'datee', -1, 1, 0, '', 1, 1);
- print ' |
';
-
- // Planned workload
- print '| '.$langs->trans("PlannedWorkload").' | ';
- print $form->select_duration('planned_workload', $planned_workload ? $planned_workload : 0, 0, 'text');
- print ' |
';
-
- // Progress
- print '| '.$langs->trans("ProgressDeclared").' | ';
- print $formother->select_percent($progress, 'progress', 0, 5, 0, 100, 1);
- print ' |
';
-
- // Description
- print '| '.$langs->trans("Description").' | ';
- print '';
- print '';
- print ' |
';
-
- // Other options
- $parameters = array();
- $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
-
- if (empty($reshook) && !empty($extrafields->attributes[$taskstatic->table_element]['label']))
- {
- print $taskstatic->showOptionals($extrafields, 'edit'); // Do not use $object here that is object of project but use $taskstatic
- }
-
- print '
';
-
- print dol_get_fiche_end();
-
- print '