X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/bf5a15e178435b96ea646ca7c3d7ca56a4f4be45..89a5c1982ce74075e74a814c170e3d87563d5c47:/plugins.php diff --git a/plugins.php b/plugins.php index 0981cb77..bf0e527f 100644 --- a/plugins.php +++ b/plugins.php @@ -53,6 +53,7 @@ if ($request->isPost()) { $cl_work_units = $request->getParameter('work_units'); $cl_approval = $request->getParameter('approval'); $cl_timesheets = $request->getParameter('timesheets'); + $cl_templates = $request->getParameter('templates'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? @@ -72,6 +73,7 @@ if ($request->isPost()) { $cl_work_units = in_array('wu', $plugins); $cl_approval = in_array('ap', $plugins); $cl_timesheets = in_array('ts', $plugins); + $cl_templates = in_array('tp', $plugins); } $form = new Form('pluginsForm'); @@ -92,6 +94,9 @@ $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_v $form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_units,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'approval','value'=>$cl_approval)); $form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets)); +if (isTrue('TEMPLATES_DEBUG')) { + $form->addInput(array('type'=>'checkbox','name'=>'templates','value'=>$cl_templates)); +} // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -130,6 +135,8 @@ if ($request->isPost()) { $plugins .= ',ap'; if ($cl_timesheets) $plugins .= ',ts'; + if ($cl_templates) + $plugins .= ',tp'; // Recycle week view plugin options as they are not configured on this page. $existing_plugins = explode(',', $user->getPlugins());