Changed the meaning of override_punch_mode to apply only to lower roles.
authorNik Okuntseff <support@anuko.com>
Fri, 16 Mar 2018 16:11:18 +0000 (16:11 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 16 Mar 2018 16:11:18 +0000 (16:11 +0000)
WEB-INF/templates/footer.tpl
mobile/time.php
mobile/time_edit.php
time.php
time_edit.php

index 98c18e5..a4aaed7 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.17.47.4085 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.47.4086 | 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 3649e17..5cffc04 100644 (file)
@@ -155,7 +155,8 @@ 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->punch_mode && !$user->can('override_punch_mode')) {
+  if ($user->punch_mode && // Punch mode enabled for team.
+        !($user->behalf_id && $user->can('override_punch_mode'))) { // Cannot override for lower roles.
     // Make the start and finish fields read-only.
     $form->getElement('start')->setEnabled(false);
     $form->getElement('finish')->setEnabled(false);
index 0efecc8..c47515b 100644 (file)
@@ -175,7 +175,8 @@ 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->punch_mode && !$user->can('override_punch_mode')) {
+  if ($user->punch_mode && // Punch mode enabled for team.
+        !($user->behalf_id && $user->can('override_punch_mode'))) { // Cannot override for lower roles.
     // Make the start and finish fields read-only.
     $form->getElement('start')->setEnabled(false);
     $form->getElement('finish')->setEnabled(false);
index d01744b..6f860fd 100644 (file)
--- a/time.php
+++ b/time.php
@@ -187,7 +187,8 @@ 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->punch_mode && !$user->can('override_punch_mode')) {
+  if ($user->punch_mode && // Punch mode enabled for team.
+        !($user->behalf_id && $user->can('override_punch_mode'))) { // Cannot override for lower roles.
     // Make the start and finish fields read-only.
     $form->getElement('start')->setEnabled(false);
     $form->getElement('finish')->setEnabled(false);
index 57de833..1ff3ad8 100644 (file)
@@ -178,7 +178,8 @@ 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->punch_mode && !$user->can('override_punch_mode')) {
+  if ($user->punch_mode && // Punch mode enabled for team.
+        !($user->behalf_id && $user->can('override_punch_mode'))) { // Cannot override for lower roles.
     // Make the start and finish fields read-only.
     $form->getElement('start')->setEnabled(false);
     $form->getElement('finish')->setEnabled(false);