Added Work plugin option on the Plugins page.
authorNik Okuntseff <support@anuko.com>
Wed, 17 Apr 2019 18:13:25 +0000 (18:13 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 17 Apr 2019 18:13:25 +0000 (18:13 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/plugins.tpl
plugins.php

index 10f788b..6e2e202 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.65.4954 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.65.4955 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index a88d3e8..97f7cdb 100644 (file)
@@ -162,6 +162,10 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.pluginsForm.attachments.control}</td>
             <td><label for="attachments">{$i18n.label.attachments}</label> <span id="attachments_doc"><a href="https://www.anuko.com/lp/tt_31.htm" target="_blank">{$i18n.label.what_is_it}</a></span></td>
           </tr>
+          <tr>
+            <td align="right" nowrap>{$forms.pluginsForm.work.control}</td>
+            <td><label for="work">{$i18n.title.work}</label> <span id="work_doc"><a href="https://www.anuko.com/lp/tt_34.htm" target="_blank">{$i18n.label.what_is_it}</a></span></td>
+          </tr>
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
index 1c0a076..dc3b7a5 100644 (file)
@@ -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());