Starting to work on attachments plugin.
authorNik Okuntseff <support@anuko.com>
Fri, 15 Mar 2019 17:59:18 +0000 (17:59 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 15 Mar 2019 17:59:18 +0000 (17:59 +0000)
WEB-INF/resources/en.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/plugins.tpl
plugins.php

index db04f81..9fd6995 100644 (file)
@@ -238,6 +238,7 @@ $i18n_key_words = array(
 'label.approval' => 'Report approval',
 'label.mark_approved' => 'Mark approved',
 'label.template' => 'Template',
+'label.attachments' => 'Attachments',
 
 // Form titles.
 'title.error' => 'Error',
index 9518800..62ae7a5 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.58.4868 | 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.58.4869 | 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 1835225..6dfd9d2 100644 (file)
@@ -158,6 +158,12 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.pluginsForm.templates.control}</td>
             <td><label for="templates">{$i18n.title.templates}</label> <span id="templates_conf"><a href="templates.php">{$i18n.label.configure}</a></span> <span id="templates_doc"><a href="https://www.anuko.com/lp/tt_29.htm" target="_blank">{$i18n.label.what_is_it}</a></span></td>
           </tr>
+{if isTrue('FILES_DEBUG')}
+          <tr>
+            <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>
+{/if}
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
index 5880aa3..1c0a076 100644 (file)
@@ -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');
@@ -95,6 +97,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_
 $form->addInput(array('type'=>'checkbox','name'=>'approval','value'=>$cl_approval));
 $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()'));
 
 // Submit button.
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save')));
@@ -136,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());