Refactored profile_edit.php for subgroups.
[timetracker.git] / reports.php
index efbf964..f430696 100644 (file)
@@ -46,17 +46,17 @@ if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports') ||
 // Use custom fields plugin if it is enabled.
 if ($user->isPluginEnabled('cf')) {
   require_once('plugins/CustomFields.class.php');
-  $custom_fields = new CustomFields($user->group_id);
+  $custom_fields = new CustomFields();
   $smarty->assign('custom_fields', $custom_fields);
 }
 
 $form = new Form('reportForm');
 
 // Get saved favorite reports for user.
-$report_list = ttFavReportHelper::getReports($user->id);
+$report_list = ttFavReportHelper::getReports();
 $form->addInput(array('type'=>'combobox',
   'name'=>'favorite_report',
-  'onchange'=>'document.reportForm.fav_report_changed.value=1;document.reportForm.submit();',
+  'onchange'=>'this.form.fav_report_changed.value=1;this.form.submit();',
   'style'=>'width: 250px;',
   'data'=>$report_list,
   'datakeys'=>array('id','name'),