-if ($request->isPost()) {
- $group_id = $request->getParameter('group');
- $user->setOnBehalfGroup($group_id);
-} else {
- $group_id = $user->getActiveGroup();
-}
-
-$form = new Form('projectsForm');
-if ($user->can('manage_subgroups')) {
- $groups = $user->getGroupsForDropdown();
- if (count($groups) > 1) {
- $form->addInput(array('type'=>'combobox',
- 'onchange'=>'this.form.submit();',
- 'name'=>'group',
- 'style'=>'width: 250px;',
- 'value'=>$group_id,
- 'data'=>$groups,
- 'datakeys'=>array('id','name')));
- $smarty->assign('group_dropdown', 1);
- }
-}