From ae37e9671b5fb2f234d1df0bf76b494ada1b3e00 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 1 Jun 2015 17:41:42 +0000 Subject: [PATCH] support filter for NIS net groups --- lam/lib/modules/nisNetGroupUser.inc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lam/lib/modules/nisNetGroupUser.inc b/lam/lib/modules/nisNetGroupUser.inc index 8ba991fb..b95ecd46 100644 --- a/lam/lib/modules/nisNetGroupUser.inc +++ b/lam/lib/modules/nisNetGroupUser.inc @@ -175,12 +175,20 @@ class nisNetGroupUser extends baseModule { $delButton->setTitle(_('Delete')); $return->addElement($delButton, true); } - $return->addVerticalSpace('20px'); + $return->addVerticalSpace('40px'); // new entry $groupList = array(); $groupData = $this->findGroups(); 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) { $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->setTitle(_('Add')); $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; }