Work in progress integrating paid status plugin as per PR #49.
authorNik Okuntseff <support@anuko.com>
Thu, 18 Jan 2018 23:16:12 +0000 (23:16 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 18 Jan 2018 23:16:12 +0000 (23:16 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/profile_edit.tpl
profile_edit.php

index 88be718..d967193 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.14.0.3753 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.14.0.3754 | 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 c4e0f58..973f3cb 100644 (file)
@@ -205,6 +205,12 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
             <td><label for="invoices">{$i18n.title.invoices}</label></td>
           </tr>
+{if ($smarty.const.DEBUG_PAID_STATUS)}
+          <tr>
+            <td align="right" nowrap>{$forms.profileForm.paid_status.control}</td>
+            <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
+          </tr>
+{/if}
           <tr>
             <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
             <td><label for="custom_fields">{$i18n.label.custom_fields}</label> <span id="cf_config"><a href="cf_custom_fields.php">{$i18n.label.configure}</a></span></td>
index 97192c3..d85c1dc 100644 (file)
@@ -67,6 +67,7 @@ if ($request->isPost()) {
     $cl_clients = $request->getParameter('clients');
     $cl_client_required = $request->getParameter('client_required');
     $cl_invoices = $request->getParameter('invoices');
+    $cl_paid_status = $request->getParameter('paid_status');
     $cl_custom_fields = $request->getParameter('custom_fields');
     $cl_expenses = $request->getParameter('expenses');
     $cl_tax_expenses = $request->getParameter('tax_expenses');
@@ -101,6 +102,7 @@ if ($request->isPost()) {
     $cl_clients = in_array('cl', $plugins);
     $cl_client_required = in_array('cm', $plugins);
     $cl_invoices = in_array('iv', $plugins);
+    $cl_paid_status = in_array('ps', $plugins);
     $cl_custom_fields = in_array('cf', $plugins);    
     $cl_expenses = in_array('ex', $plugins);
     $cl_tax_expenses = in_array('et', $plugins);
@@ -193,6 +195,7 @@ if ($user->canManageTeam()) {
   $form->addInput(array('type'=>'checkbox','name'=>'client_required','value'=>$cl_client_required));
 
   $form->addInput(array('type'=>'checkbox','name'=>'invoices','value'=>$cl_invoices));
+  $form->addInput(array('type'=>'checkbox','name'=>'paid_status','value'=>$cl_paid_status));
   $form->addInput(array('type'=>'checkbox','name'=>'custom_fields','value'=>$cl_custom_fields,'onchange'=>'handlePluginCheckboxes()'));
   $form->addInput(array('type'=>'checkbox','name'=>'expenses','value'=>$cl_expenses,'onchange'=>'handlePluginCheckboxes()'));
   $form->addInput(array('type'=>'checkbox','name'=>'tax_expenses','value'=>$cl_tax_expenses));
@@ -242,6 +245,8 @@ if ($request->isPost()) {
         $plugins .= ',cm';
       if ($cl_invoices)
         $plugins .= ',iv';
+      if ($cl_paid_status)
+        $plugins .= ',ps';
       if ($cl_custom_fields)
         $plugins .= ',cf';
       if ($cl_expenses)