X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=profile_edit.php;h=11ca2954de0b29471157789c016caaea48eacb40;hb=6deafabef6031f12fe9fec94d9262ba460f7875b;hp=9fac75f8412ef7fb37ae00cbee80a878ca92ff0a;hpb=058d776c118501eb510967c8b870bc346bc39e71;p=timetracker.git diff --git a/profile_edit.php b/profile_edit.php index 9fac75f8..11ca2954 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -59,6 +59,8 @@ 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'); $cl_charts = $request->getParameter('charts'); @@ -86,6 +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_project_required = $user->project_required; + $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; $cl_uncompleted_indicators = $user->uncompleted_indicators; @@ -161,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(); @@ -251,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)); @@ -273,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');