From: Nik Okuntseff Date: Fri, 16 Mar 2018 16:11:18 +0000 (+0000) Subject: Changed the meaning of override_punch_mode to apply only to lower roles. X-Git-Tag: timetracker_1.19-1~1026 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=55bb8bbaca7f898c41398861c266763dd5ead789;p=timetracker.git Changed the meaning of override_punch_mode to apply only to lower roles. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 98c18e5e..a4aaed7d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.47.4085 | Copyright © Anuko | +  Anuko Time Tracker 1.17.47.4086 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/time.php b/mobile/time.php index 3649e175..5cffc047 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -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); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 0efecc89..c47515b6 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -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); diff --git a/time.php b/time.php index d01744bf..6f860fd0 100644 --- 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); diff --git a/time_edit.php b/time_edit.php index 57de8338..1ff3ad8d 100644 --- a/time_edit.php +++ b/time_edit.php @@ -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);