support filter for NIS net groups

This commit is contained in:
Roland Gruber 2015-06-01 17:41:42 +00:00
parent ec066fe7e6
commit ae37e9671b
1 changed files with 9 additions and 10 deletions

View File

@ -175,12 +175,20 @@ class nisNetGroupUser extends baseModule {
$delButton->setTitle(_('Delete')); $delButton->setTitle(_('Delete'));
$return->addElement($delButton, true); $return->addElement($delButton, true);
} }
$return->addVerticalSpace('20px'); $return->addVerticalSpace('40px');
// new entry // new entry
$groupList = array(); $groupList = array();
$groupData = $this->findGroups(); $groupData = $this->findGroups();
if (sizeof($groupData) > 0) { if (sizeof($groupData) > 0) {
$filterGroup = new htmlGroup();
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
$filter = new htmlInputField('group_filter');
$filter->setFieldSize('5em');
$filter->setOnKeyUp('filterSelect(\'group_filter\', \'group_add\', event);');
$filterGroup->addElement($filter);
$return->addElement($filterGroup, true);
foreach ($groupData as $group) { foreach ($groupData as $group) {
$groupList[$group['cn'][0]] = $group['cn'][0] . '#+#' . $group['dn']; $groupList[$group['cn'][0]] = $group['cn'][0] . '#+#' . $group['dn'];
} }
@ -192,15 +200,6 @@ class nisNetGroupUser extends baseModule {
$addButton = new htmlButton('addGroup', 'add.png', true); $addButton = new htmlButton('addGroup', 'add.png', true);
$addButton->setTitle(_('Add')); $addButton->setTitle(_('Add'));
$return->addElement($addButton, true); $return->addElement($addButton, true);
$filterGroup = new htmlGroup();
$filterGroup->alignment = htmlElement::ALIGN_RIGHT;
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
$filter = new htmlInputField('group_filter');
$filter->setFieldSize('5em');
$filter->setOnKeyUp('filterSelect(\'group_filter\', \'group_add\', event);');
$filterGroup->addElement($filter);
$return->addElement($filterGroup, true);
} }
return $return; return $return;
} }