FIX extrafields of taks not visible in creation

This commit is contained in:
Laurent Destailleur 2018-10-26 16:21:01 +02:00
parent ed0393dfa8
commit d800fe9256

View File

@ -490,7 +490,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Planned workload
print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
print $form->select_duration('planned_workload', $planned_workload?$planned_workload : $object->planned_workload,0,'text');
print $form->select_duration('planned_workload', $planned_workload?$planned_workload : 0, 0, 'text');
print '</td></tr>';
// Progress
@ -506,11 +506,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Other options
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
$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_task->attribute_label))
{
print $object->showOptionals($extrafields_task,'edit');
print $taskstatic->showOptionals($extrafields_task,'edit'); // Do not use $object here that is object of project
}
print '</table>';