protected function addUserGroupsToProject(Project $project) { ugroup_create($project->getId(), 'static_ugroup_1', 'static_ugroup_1', ''); ugroup_create($project->getId(), 'static_ugroup_2', 'static_ugroup_2', ''); }
public function createEmptyUgroup($project_id, $ugroup_name, $ugroup_description) { return ugroup_create($project_id, $ugroup_name, $ugroup_description, "cx_empty"); }
<tr> <td width="21%"><b>' . $Language->getText('project_admin_editugroup', 'desc') . '</b>:</td> <td width="79%"> <textarea name="ugroup_description" rows="3" cols="50">' . $ugroup_description . '</textarea> </td> </tr>'; } $group_id = $request->getValidated('group_id', 'GroupId', 0); session_require(array('group' => $group_id, 'admin_flags' => 'A')); $vFunc = new Valid_WhiteList('func', array('create', 'do_create', 'edit')); $func = $request->getValidated('func', $vFunc, 'create'); if ($request->isPost() && $func == 'do_create') { $name = $request->getValidated('ugroup_name', 'String', ''); $desc = $request->getValidated('ugroup_description', 'String', ''); $tmpl = $request->getValidated('group_templates', 'String', ''); $ugroup_id = ugroup_create($group_id, $name, $desc, $tmpl); $GLOBALS['Response']->redirect('/project/admin/editugroup.php?group_id=' . $group_id . '&ugroup_id=' . $ugroup_id . '&func=edit'); } if ($func == 'create') { project_admin_header(array('title' => $Language->getText('project_admin_editugroup', 'create_ug'), 'group' => $group_id, 'help' => 'UserGroups.html#UGroupCreation')); $pm = ProjectManager::instance(); $project = $pm->getProject($group_id); print '<P><h2>' . $Language->getText('project_admin_editugroup', 'create_ug_for', $project->getPublicName()) . '</h2>'; echo '<p>' . $Language->getText('project_admin_editugroup', 'fill_ug_desc') . '</p>'; echo '<form method="post" name="form_create" action="/project/admin/editugroup.php?group_id=' . $group_id . '"> <input type="hidden" name="func" value="do_create"> <input type="hidden" name="group_id" value="' . $group_id . '">'; display_name_and_desc_form(isset($ugroup_name) ? $ugroup_name : '', isset($ugroup_description) ? $ugroup_description : ''); echo '<tr> <td width="21%"><b>' . $Language->getText('project_admin_editugroup', 'create_from') . '</b>:</td> <td width="79%">';