X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=plugins.php;h=1c0a076bb2a18bdfe2ca6f9c6b5360a500abe072;hb=ccf6c015e1f48d747ae697944c3d50e8fccf8080;hp=e20bb9617059248962da2561243dd2ee66620d32;hpb=98f5feaaf9bbf59fcf6e797c6c05978ef13074f6;p=timetracker.git diff --git a/plugins.php b/plugins.php index e20bb961..1c0a076b 100644 --- a/plugins.php +++ b/plugins.php @@ -54,6 +54,7 @@ if ($request->isPost()) { $cl_approval = $request->getParameter('approval'); $cl_timesheets = $request->getParameter('timesheets'); $cl_templates = $request->getParameter('templates'); + $cl_attachments = $request->getParameter('attachments'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? @@ -74,6 +75,7 @@ if ($request->isPost()) { $cl_approval = in_array('ap', $plugins); $cl_timesheets = in_array('ts', $plugins); $cl_templates = in_array('tp', $plugins); + $cl_attachments = in_array('at', $plugins); } $form = new Form('pluginsForm'); @@ -94,9 +96,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()')); -} +$form->addInput(array('type'=>'checkbox','name'=>'templates','value'=>$cl_templates,'onchange'=>'handlePluginCheckboxes()')); +$form->addInput(array('type'=>'checkbox','name'=>'attachments','value'=>$cl_attachments,'onchange'=>'handlePluginCheckboxes()')); + // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -137,6 +139,8 @@ if ($request->isPost()) { $plugins .= ',ts'; if ($cl_templates) $plugins .= ',tp'; + if ($cl_attachments) + $plugins .= ',at'; // Recycle week view plugin options as they are not configured on this page. $existing_plugins = explode(',', $user->getPlugins());