$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit')));
if ($request->isPost()) {
+
/*
* Note: creating a group by admin is pretty much the same as self-registration,
- * except that created_by gields for group and user must be set to admin account.
+ * except that created_by fields for group and user must be set to admin account.
* Therefore, we'll reuse ttRegistrator instance to create a group here
* and override created_by fields using ttRegistrator::setCreatedBy() function.
*/
$registrator->register();
$registrator->setCreatedBy($user->id); // Override created_by to admin account.
if ($err->no()) {
- header('Location: admin_teams.php');
+ header('Location: admin_groups.php');
exit();
}
} // isPost
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.teamForm.team.focus()"');
$smarty->assign('content_page_name', 'admin_team_add.tpl');
-$smarty->assign('title', $i18n->get('title.create_team'));
+$smarty->assign('title', $i18n->get('title.create_group'));
$smarty->display('index.tpl');