Fixed a problem with READONLY_START_FINISH mode.
authoranuko <support@anuko.com>
Thu, 13 Apr 2017 02:15:30 +0000 (02:15 +0000)
committeranuko <support@anuko.com>
Thu, 13 Apr 2017 02:15:30 +0000 (02:15 +0000)
WEB-INF/templates/footer.tpl
mobile/time.php
mobile/time_edit.php
time.php
time_edit.php

index 73c1078..24721d0 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.10.41.3626 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.10.42.3627 | 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 367579b..f5d7c2e 100644 (file)
@@ -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');"));
index 81e5ab8..f80611f 100644 (file)
@@ -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');"));
index 4a58dcc..519c18c 100644 (file)
--- 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');"));
index 4484a20..ae1b3c4 100644 (file)
@@ -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');"));