From 290ac432a51cb8ae35284b215defadbf182dd788 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 13 Apr 2017 02:15:30 +0000 Subject: [PATCH] Fixed a problem with READONLY_START_FINISH mode. --- WEB-INF/templates/footer.tpl | 2 +- mobile/time.php | 10 +++++----- mobile/time_edit.php | 10 +++++----- time.php | 10 +++++----- time_edit.php | 10 +++++----- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 73c10788..24721d0c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.10.41.3626 | Copyright © Anuko | +  Anuko Time Tracker 1.10.42.3627 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/time.php b/mobile/time.php index 367579b1..f5d7c2e7 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -155,11 +155,11 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); -} -if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 81e5ab8e..f80611f3 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -175,11 +175,11 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); -} -if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); diff --git a/time.php b/time.php index 4a58dcc1..519c18c5 100644 --- a/time.php +++ b/time.php @@ -187,11 +187,11 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); -} -if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); diff --git a/time_edit.php b/time_edit.php index 4484a20c..ae1b3c42 100644 --- a/time_edit.php +++ b/time_edit.php @@ -175,11 +175,11 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); -} -if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); -- 2.20.1