Starting to use on behalf group properties.
[timetracker.git] / time.php
index 258f15c..c7d2979 100644 (file)
--- a/time.php
+++ b/time.php
@@ -107,9 +107,9 @@ $_SESSION['task'] = $cl_task;
 // Elements of timeRecordForm.
 $form = new Form('timeRecordForm');
 
-if (defined('SUBGROUP_DEBUG') && isTrue(SUBGROUP_DEBUG)) {
+if (isTrue(SUBGROUP_DEBUG)) {
 if ($user->can('manage_subgroups')) {
-  $groups = $user->getGroups();
+  $groups = $user->getGroupsForDropdown();
   if (count($groups) > 1) {
     $form->addInput(array('type'=>'combobox',
       'onchange'=>'this.form.submit();',
@@ -313,6 +313,7 @@ if ($request->isPost()) {
         'date' => $cl_date,
         'user_id' => $user->getActiveUser(),
         'group_id' => $user->getActiveGroup(),
+        'org_id' => $user->org_id,
         'client' => $cl_client,
         'project' => $cl_project,
         'task' => $cl_task,