X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time.php;h=c001f21f617b14c67f339a0de41b221e50a2a116;hb=de518d7584b24c438ac562b3f1eca4e96568c85a;hp=519c18c531b4fc42b8ad95b5def9f5602fde0acb;hpb=290ac432a51cb8ae35284b215defadbf182dd788;p=timetracker.git diff --git a/time.php b/time.php index 519c18c5..c001f21f 100644 --- a/time.php +++ b/time.php @@ -88,7 +88,7 @@ if ($user->isPluginEnabled('iv')) { if ($request->isPost()) { $cl_billable = $request->getParameter('billable'); $_SESSION['billable'] = (int) $cl_billable; - } else + } else if (isset($_SESSION['billable'])) $cl_billable = $_SESSION['billable']; } @@ -146,7 +146,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t // Dropdown for clients if the clients plugin is enabled. if ($user->isPluginEnabled('cl')) { $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); - // We need an array of assigned project ids to do some trimming. + // We need an array of assigned project ids to do some trimming. foreach($project_list as $project) $projects_assigned_to_user[] = $project['id']; @@ -196,7 +196,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); + define('NOTE_INPUT_HEIGHT', 40); $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar if ($user->isPluginEnabled('iv')) @@ -231,6 +231,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 (strlen($cl_duration) == 0) { if ($cl_start || $cl_finish) { if (!ttTimeHelper::isValidTime($cl_start)) @@ -354,6 +357,7 @@ if ($request->isPost()) { $week_total = ttTimeHelper::getTimeForWeek($user->getActiveUser(), $selected_date); +$smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); $smarty->assign('time_records', ttTimeHelper::getRecords($user->getActiveUser(), $cl_date));