X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/78ef5f9b455fc04a3fe8535f234d98bddf4de6c9..8b1efafeb5921f14235cf45cf58ef404700141aa:/groups.php diff --git a/groups.php b/groups.php index 5a612c13..7f4937c9 100644 --- a/groups.php +++ b/groups.php @@ -39,7 +39,21 @@ if (!ttAccessAllowed('manage_subgroups')) { } // End of access checks. -$smarty->assign('groups', $user->getGroups()); -$smarty->assign('title', $i18n->get('title.groups')); +$form = new Form('groupsForm'); +$groups = $user->getGroups(); +if (count($groups) > 1) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'this.form.submit();', + 'name'=>'onBehalfGroup', + 'style'=>'width: 250px;', + 'value'=>$on_behalf_group_id, + 'data'=>$groups, + 'datakeys'=>array('id','name'))); + $smarty->assign('on_behalf_group_control', 1); +} + +$smarty->assign('subgroups', $user->getSubgroups()); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('title', $i18n->get('label.subgroups')); $smarty->assign('content_page_name', 'groups.tpl'); $smarty->display('index.tpl');