X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time_edit.php;h=854c4463771a6dd1f65eb76e715e0ccc4add85e5;hb=7e31ec9db2a079cb231416b8243a8efc52a92ad9;hp=4484a20cc282fddc407f0241d255fbba5cfa411f;hpb=058d776c118501eb510967c8b870bc346bc39e71;p=timetracker.git diff --git a/time_edit.php b/time_edit.php index 4484a20c..854c4463 100644 --- a/time_edit.php +++ b/time_edit.php @@ -175,11 +175,11 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); -} -if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); @@ -219,6 +219,9 @@ if ($request->isPost()) { if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if (!$cl_project) $err->add($i18n->getKey('error.project')); } + if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode && $user->task_required) { + if (!$cl_task) $err->add($i18n->getKey('error.task')); + } if (!$cl_duration) { if ('0' == $cl_duration) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));