From 6756191f98a9812d075dc2fae455921b1a09d850 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 13 Apr 2018 23:24:06 +0000 Subject: [PATCH] A bit of refactoring. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/reports.tpl | 4 ++-- time_edit.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c9612607..dbacaa7f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} -{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))} +{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))} @@ -264,7 +264,7 @@ function handleCheckboxes() { -{if (($user->canManageTeam() || $user->isClient()) || $user->isPluginEnabled('ex'))} +{if ($user->can('manage_invoices') || $user->isClient()) || $user->isPluginEnabled('ex')} {else} diff --git a/time_edit.php b/time_edit.php index 81259436..fd1851dc 100644 --- a/time_edit.php +++ b/time_edit.php @@ -206,7 +206,7 @@ if ($custom_fields && $custom_fields->fields[0]) { $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); if ($user->isPluginEnabled('iv')) $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); -if ($user->canManageTeam() && $user->isPluginEnabled('ps')) +if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) $form->addInput(array('type'=>'checkbox','name'=>'paid','value'=>$cl_paid)); $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save or btn_copy click. $form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.save'))); -- 2.20.1
 Anuko Time Tracker 1.17.88.4260 | Copyright © Anuko | +  Anuko Time Tracker 1.17.88.4261 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 2ee48b01..640a55ca 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -209,7 +209,7 @@ function handleCheckboxes() { {$forms.reportForm.invoice.control}
{$i18n.label.paid_status}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if}