X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/395edff71f2a114bc3cbccf1c970d4419d9db8d4..fadb4320a14d2afac38ddd2ac66b1738a483eebd:/profile_edit.php diff --git a/profile_edit.php b/profile_edit.php index 1663f446..11ca2954 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -59,6 +59,7 @@ if ($request->isPost()) { $cl_custom_format_time = $request->getParameter('format_time'); $cl_start_week = $request->getParameter('start_week'); $cl_tracking_mode = $request->getParameter('tracking_mode'); + $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); @@ -87,7 +88,8 @@ if ($request->isPost()) { $cl_custom_format_time = $user->time_format; $cl_start_week = $user->week_start; $cl_tracking_mode = $user->tracking_mode; - $cl_ttask_required = $user->task_required; + $cl_project_required = $user->project_required; + $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; $cl_uncompleted_indicators = $user->uncompleted_indicators; @@ -163,7 +165,9 @@ if ($user->canManageTeam()) { $tracking_mode_options[MODE_TIME] = $i18n->getKey('form.profile.mode_time'); $tracking_mode_options[MODE_PROJECTS] = $i18n->getKey('form.profile.mode_projects'); $tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->getKey('form.profile.mode_projects_and_tasks'); - $form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode)); + $form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode,'onchange'=>'handleTaskRequiredCheckbox()')); + $form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required)); + $form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required)); // Prepare record type choices. $record_type_options = array(); @@ -253,6 +257,8 @@ if ($request->isPost()) { 'time_format' => $cl_custom_format_time, 'week_start' => $cl_start_week, 'tracking_mode' => $cl_tracking_mode, + 'project_required' => $cl_project_required, + 'task_required' => $cl_task_required, 'record_type' => $cl_record_type, 'uncompleted_indicators' => $cl_uncompleted_indicators, 'plugins' => $plugins)); @@ -275,7 +281,7 @@ if ($request->isPost()) { $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="handlePluginCheckboxes()"'); +$smarty->assign('onload', 'onLoad="handleTaskRequiredCheckbox(); handlePluginCheckboxes();"'); $smarty->assign('title', $i18n->getKey('title.profile')); $smarty->assign('content_page_name', 'profile_edit.tpl'); $smarty->display('index.tpl');