From: Nik Okuntseff Date: Sat, 1 Dec 2018 22:07:26 +0000 (+0000) Subject: Adjusting client_add.php and client_edit.php for subgroups. X-Git-Tag: timetracker_1.19-1~503 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e92d4ffe1d8dfe70c11be7862b31de432a6bab07;p=timetracker.git Adjusting client_add.php and client_edit.php for subgroups. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 111e83dd..83288cf4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.29.4562 | Copyright © Anuko | +  Anuko Time Tracker 1.18.29.4563 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/client_add.php b/client_add.php index b3d27ac7..6f678cea 100644 --- a/client_add.php +++ b/client_add.php @@ -41,7 +41,7 @@ if (!$user->isPluginEnabled('cl')) { exit(); } -$projects = ttTeamHelper::getActiveProjects($user->group_id); +$projects = ttTeamHelper::getActiveProjects($user->getGroup()); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); @@ -58,7 +58,7 @@ $form = new Form('clientForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 350px;','value'=>$cl_name)); $form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address)); $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); -if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) +if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); diff --git a/client_edit.php b/client_edit.php index 34c0a070..0d57c9d2 100644 --- a/client_edit.php +++ b/client_edit.php @@ -43,7 +43,7 @@ if (!$user->isPluginEnabled('cl')) { $cl_id = (int) $request->getParameter('id'); -$projects = ttTeamHelper::getActiveProjects($user->group_id); +$projects = ttTeamHelper::getActiveProjects($user->getGroup()); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); @@ -70,7 +70,7 @@ $form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','s $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) +if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'datakeys'=>array('id','name'),'layout'=>'H','value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy')));