From 6970116f343469689e3014845bbff5c77c3bc6c4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 23:16:12 +0000 Subject: [PATCH] Work in progress integrating paid status plugin as per PR #49. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 6 ++++++ profile_edit.php | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 88be7185..d9671930 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if ($smarty.const.DEBUG_PAID_STATUS)} + + + + +{/if} diff --git a/profile_edit.php b/profile_edit.php index 97192c37..d85c1dcc 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -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) -- 2.20.1
 Anuko Time Tracker 1.14.0.3753 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3754 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index c4e0f581..973f3cb8 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -205,6 +205,12 @@ function handlePluginCheckboxes() { {$forms.profileForm.invoices.control}
{$forms.profileForm.paid_status.control}
{$forms.profileForm.custom_fields.control} {$i18n.label.configure}