X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=plugins.php;h=e20bb9617059248962da2561243dd2ee66620d32;hb=163beaf9eb740a868fc08e0d8361ac72c932185c;hp=0981cb77abd848849c2d7fb26156ca518efb7431;hpb=af80607509fae805aae37ba966f24aa50986fe9d;p=timetracker.git diff --git a/plugins.php b/plugins.php index 0981cb77..e20bb961 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,'onchange'=>'handlePluginCheckboxes()')); +} // 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());