+if (defined('SUBGROUP_DEBUG') && isTrue(SUBGROUP_DEBUG)) {
+if ($user->can('manage_subgroups')) {
+ $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);
+ }
+}
+} // SUBGROUP_DEBUG
+