require_once('initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttRoleHelper');
// Access check.
if (!ttAccessCheck(right_manage_team)) {
exit();
}
+// If there are no roles in team, introduce default ones.
+if (!ttRoleHelper::rolesExist()) ttRoleHelper::createDefaultRoles();
+
$smarty->assign('active_roles', ttTeamHelper::getActiveRoles($user->team_id));
$smarty->assign('inactive_roles', ttTeamHelper::getInactiveRoles($user->team_id));
-$smarty->assign('title', $i18n->getKey('label.roles'));
+$smarty->assign('title', $i18n->getKey('title.roles'));
$smarty->assign('content_page_name', 'roles.tpl');
$smarty->display('index.tpl');