Starting to use on behalf group properties.
authorNik Okuntseff <support@anuko.com>
Sun, 25 Nov 2018 22:23:03 +0000 (22:23 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 25 Nov 2018 22:23:03 +0000 (22:23 +0000)
WEB-INF/lib/ttGroup.class.php
WEB-INF/lib/ttUser.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/user_add.tpl

index 2943438..c12be77 100644 (file)
@@ -84,8 +84,8 @@ class ttGroup {
       $this->date_format = $val['date_format'];
       $this->time_format = $val['time_format'];
       $this->week_start = $val['week_start'];
-      /* TODO: initialize other things here.
       $this->tracking_mode = $val['tracking_mode'];
+      /* TODO: initialize other things here.
       $this->project_required = $val['project_required'];
       $this->task_required = $val['task_required'];
       $this->record_type = $val['record_type'];
index ccd1f96..5f97ae2 100644 (file)
@@ -166,6 +166,16 @@ class ttUser {
     }
   }
 
+  // getDecimalMark returns decimal mark for active group.
+  function getDecimalMark() {
+    return ($this->behalfGroup ? $this->behalfGroup->decimal_mark : $this->decimal_mark);
+  }
+
+  // getTrackingMode returns tracking mode for active group.
+  function getTrackingMode() {
+    return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
+  }
+
   // The getActiveUser returns user id on behalf of whom the current user is operating.
   function getActiveUser() {
     return ($this->behalf_id ? $this->behalf_id : $this->id);
index 13992f2..bd293c4 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.18.28.4517 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.28.4518 | 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 e1a0535..762f052 100644 (file)
@@ -78,10 +78,10 @@ function handleClientControl() {
       <td>{$forms.userForm.role.control} {$forms.userForm.client.control}</td>
     </tr>
     <tr>
-      <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->decimal_mark}00):</td>
+      <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->getDecimalMark()}00):</td>
       <td>{$forms.userForm.rate.control}</td>
     </tr>
-{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
     <tr valign="top">
       <td align="right">{$i18n.label.projects}:</td>
       <td>{$forms.userForm.projects.control}</td>