Work on progress on report approval plugin.
[timetracker.git] / plugins.php
index 64615aa..0981cb7 100644 (file)
@@ -51,6 +51,7 @@ if ($request->isPost()) {
   $cl_quotas = $request->getParameter('quotas');
   $cl_week_view = $request->getParameter('week_view');
   $cl_work_units = $request->getParameter('work_units');
+  $cl_approval = $request->getParameter('approval');
   $cl_timesheets = $request->getParameter('timesheets');
 } else {
   // Note: we get here in get, and also in post when group changes.
@@ -69,6 +70,7 @@ if ($request->isPost()) {
   $cl_quotas = in_array('mq', $plugins);
   $cl_week_view = in_array('wv', $plugins);
   $cl_work_units = in_array('wu', $plugins);
+  $cl_approval = in_array('ap', $plugins);
   $cl_timesheets = in_array('ts', $plugins);
 }
 
@@ -88,6 +90,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,
 $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
 $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()'));
 $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));
 // Submit button.
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save')));
@@ -123,6 +126,8 @@ if ($request->isPost()) {
     $plugins .= ',wv';
   if ($cl_work_units)
     $plugins .= ',wu';
+  if ($cl_approval)
+    $plugins .= ',ap';
   if ($cl_timesheets)
     $plugins .= ',ts';