fixed group selection

This commit is contained in:
Roland Gruber 2005-04-23 14:26:22 +00:00
parent 8301e5aff3
commit 2c762b1d84
1 changed files with 26 additions and 11 deletions

View File

@ -874,6 +874,12 @@ class posixAccount extends baseModule {
return $return; return $return;
} }
/**
* Displays the group selection.
*
* @param array $post HTTP-POST
* @return array meta HTML code
*/
function display_html_group(&$post) { function display_html_group(&$post) {
// load list with all groups // load list with all groups
$dn_groups = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group'); $dn_groups = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group');
@ -890,19 +896,28 @@ class posixAccount extends baseModule {
// sort groups // sort groups
sort($groups, SORT_STRING); sort($groups, SORT_STRING);
$return[] = array ( 0 => array ( 'kind' => 'fieldset', 'legend' => _("Additional groups"), 'value' => $return[] = array(
array ( 0 => array ( 0 => array ('kind' => 'fieldset', 'td' => array ('valign' => 'top'), 'legend' => _("Selected groups"), 'value' => 0 => array('kind' => 'fieldset', 'legend' => _("Additional groups"), 'value' => array(
array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'removegroups[]', 'size' => '15', 'multiple', 'options' => $this->groups)))), 0 => array(
1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'input', 'type' => 'submit', 'name' => 'addgroups_button', 0 => array('kind' => 'fieldset', 'td' => array('valign' => 'top'), 'legend' => _("Selected groups"), 'value' => array(
'value' => '<=')), 1 => array ( 0 => array ( 'kind' => 'input', 'type' => 'submit', 'name' => 'removegroups_button', 'value' => '=>' )), 0 => array (
2 => array ( 0 => array ( 'kind' => 'help', 'value' => 'addgroup' )))), 0 => array('kind' => 'select', 'name' => 'removegroups', 'size' => '15', 'multiple' => true, 'options' => $this->groups)))),
2 => array ('kind' => 'fieldset', 'td' => array ('valign' => 'top'), 'legend' => _("Available groups"), 'value' => 1 => array('kind' => 'table', 'value' => array(
array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'addgroups[]', 'size' => '15', 'multiple', 'options' => $groups)))) 0 => array(
0 => array('kind' => 'input', 'type' => 'submit', 'name' => 'addgroups_button', 'value' => '<=', 'td' => array('align' => 'center'))),
1 => array(
0 => array ( 'kind' => 'input', 'type' => 'submit', 'name' => 'removegroups_button', 'value' => '=>', 'td' => array('align' => 'center'))),
2 => array(
0 => array ( 'kind' => 'help', 'value' => 'addgroup', 'td' => array('align' => 'center'))))),
2 => array('kind' => 'fieldset', 'td' => array('valign' => 'top'), 'legend' => _("Available groups"), 'value' => array(
0 => array(
0 => array('kind' => 'select', 'name' => 'addgroups', 'size' => '15', 'multiple' => true, 'options' => $groups))))
)))); ))));
$return[] = array ( 0 => array ( 'kind' => 'input', 'type' => 'submit', 'value' => _('Back'), 'name' => 'back' ), $return[] = array(
1 => array ( 'kind' => 'text'), 0 => array('kind' => 'input', 'type' => 'submit', 'value' => _('Back'), 'name' => 'back'),
2 => array ('kind' => 'text')); 1 => array('kind' => 'text'),
2 => array('kind' => 'text'));
return $return; return $return;
} }