From 4fb3e6fdb5dff1a08126d53fb4e8baec64074da7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 17 Apr 2019 18:13:25 +0000 Subject: [PATCH] Added Work plugin option on the Plugins page. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/plugins.tpl | 4 ++++ plugins.php | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 10f788ba..6e2e202d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + diff --git a/plugins.php b/plugins.php index 1c0a076b..dc3b7a5d 100644 --- a/plugins.php +++ b/plugins.php @@ -55,6 +55,7 @@ if ($request->isPost()) { $cl_timesheets = $request->getParameter('timesheets'); $cl_templates = $request->getParameter('templates'); $cl_attachments = $request->getParameter('attachments'); + $cl_work = $request->getParameter('work'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? @@ -76,6 +77,7 @@ if ($request->isPost()) { $cl_timesheets = in_array('ts', $plugins); $cl_templates = in_array('tp', $plugins); $cl_attachments = in_array('at', $plugins); + $cl_work = in_array('wk', $plugins); } $form = new Form('pluginsForm'); @@ -98,6 +100,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'approval','value'=>$cl_approva $form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets)); $form->addInput(array('type'=>'checkbox','name'=>'templates','value'=>$cl_templates,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'attachments','value'=>$cl_attachments,'onchange'=>'handlePluginCheckboxes()')); +$form->addInput(array('type'=>'checkbox','name'=>'work','value'=>$cl_work,'onchange'=>'handlePluginCheckboxes()')); // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -141,6 +144,8 @@ if ($request->isPost()) { $plugins .= ',tp'; if ($cl_attachments) $plugins .= ',at'; + if ($cl_work) + $plugins .= ',wk'; // Recycle week view plugin options as they are not configured on this page. $existing_plugins = explode(',', $user->getPlugins()); -- 2.20.1
 Anuko Time Tracker 1.18.65.4954 | Copyright © Anuko | +  Anuko Time Tracker 1.18.65.4955 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index a88d3e8d..97f7cdb9 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -162,6 +162,10 @@ function handlePluginCheckboxes() { {$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.work.control} {$i18n.label.what_is_it}