projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bit more refactoring for subgroups.
[timetracker.git]
/
mobile
/
user_add.php
diff --git
a/mobile/user_add.php
b/mobile/user_add.php
index
53b9842
..
ab6f5e2
100644
(file)
--- a/
mobile/user_add.php
+++ b/
mobile/user_add.php
@@
-29,6
+29,7
@@
require_once('../initialize.php');
import('form.Form');
import('ttTeamHelper');
require_once('../initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttUserHelper');
import('form.Table');
import('form.TableColumn');
import('ttUserHelper');
import('form.Table');
import('form.TableColumn');
@@
-41,11
+42,11
@@
if (!ttAccessAllowed('manage_users')) {
// End of access checks.
// Use the "limit" plugin if we have one. Ignore include errors.
// End of access checks.
// Use the "limit" plugin if we have one. Ignore include errors.
-// The "limit" plugin is not required for normal operation of
the
Time Tracker.
-@include('plugins/limit/user_add.php');
+// The "limit" plugin is not required for normal operation of Time Tracker.
+@include('
../
plugins/limit/user_add.php');
if ($user->isPluginEnabled('cl'))
if ($user->isPluginEnabled('cl'))
- $clients = tt
TeamHelper::getActiveClients($user->team_id
);
+ $clients = tt
GroupHelper::getActiveClients(
);
$assigned_projects = array();
if ($request->isPost()) {
$assigned_projects = array();
if ($request->isPost()) {
@@
-89,7
+90,7
@@
if ($user->isPluginEnabled('cl'))
$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate));
$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate));
-$projects = tt
TeamHelper::getActiveProjects($user->team_id
);
+$projects = tt
GroupHelper::getActiveProjects(
);
// Define classes for the projects table.
class NameCellRenderer extends DefaultCellRenderer {
// Define classes for the projects table.
class NameCellRenderer extends DefaultCellRenderer {
@@
-147,7
+148,7
@@
if ($request->isPost()) {
'login' => $cl_login,
'password' => $cl_password1,
'rate' => $cl_rate,
'login' => $cl_login,
'password' => $cl_password1,
'rate' => $cl_rate,
- '
team_id' => $user->team
_id,
+ '
group_id' => $user->group
_id,
'role_id' => $cl_role_id,
'client_id' => $cl_client_id,
'projects' => $assigned_projects,
'role_id' => $cl_role_id,
'client_id' => $cl_client_id,
'projects' => $assigned_projects,