From 536ddda01eecc10f0368e5c144c12a51df19d2b6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 16 Aug 2024 07:55:26 +0200 Subject: [PATCH] #354 added filters --- lam/lib/modules/inetOrgPerson.inc | 15 ++++++++++++++- lam/lib/modules/windowsGroup.inc | 15 ++++++++++++++- lam/lib/modules/windowsHost.inc | 15 ++++++++++++++- lam/lib/modules/windowsUser.inc | 13 +++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index ce420982c..b546e985d 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -811,6 +811,11 @@ class inetOrgPerson extends baseModule implements passwordService, AccountStatus "Headline" => _('Add addressbook (ou=addressbook)'), "Text" => _('Adds an "ou=addressbook" subentry to each user.') ], + 'filter' => [ + "Headline" => _("Filter"), + "Text" => _("Here you can enter a filter value. Only entries which contain the filter text will be shown.") + . ' ' . _('Possible wildcards are: "*" = any character, "^" = line start, "$" = line end') + ], ]; return $return; } @@ -1844,7 +1849,15 @@ class inetOrgPerson extends baseModule implements passwordService, AccountStatus $managerSelect->setRightToLeftTextDirection(true); $managerSelect->setSortElements(false); $managerSelect->setTransformSingleSelect(false); - $return->add($managerSelect, 12); + $return->add($managerSelect); + $filterGroup = new htmlGroup(); + $filterGroup->addElement(new htmlOutputText(_('Filter'))); + $filterInput = new htmlInputField('filter'); + $filterInput->filterSelectBox('manager'); + $filterInput->setCSSClasses(['max-width-10']); + $filterGroup->addElement($filterInput); + $filterGroup->addElement(new htmlHelpLink('filter')); + $return->add($filterGroup); $return->addVerticalSpacer('1rem'); $return->addLabel(new htmlAccountPageButton(get_class($this), 'manager', 'addManagers', _('Add'))); $return->addField(new htmlAccountPageButton(get_class($this), 'manager', 'cancel', _('Cancel'))); diff --git a/lam/lib/modules/windowsGroup.inc b/lam/lib/modules/windowsGroup.inc index 935413d57..d87307da8 100644 --- a/lam/lib/modules/windowsGroup.inc +++ b/lam/lib/modules/windowsGroup.inc @@ -171,6 +171,11 @@ class windowsGroup extends baseModule { "Headline" => _('NIS domain'), 'attr' => 'msSFU30NisDomain', "Text" => _('NIS domain name.') ], + 'filter' => [ + "Headline" => _("Filter"), + "Text" => _("Here you can enter a filter value. Only entries which contain the filter text will be shown.") + . ' ' . _('Possible wildcards are: "*" = any character, "^" = line start, "$" = line end') + ], ]; // upload fields $return['upload_columns'] = [ @@ -599,7 +604,15 @@ class windowsGroup extends baseModule { $membersSelect->setRightToLeftTextDirection(true); $membersSelect->setSortElements(false); $membersSelect->setTransformSingleSelect(false); - $return->add($membersSelect, 12); + $return->add($membersSelect); + $filterGroup = new htmlGroup(); + $filterGroup->addElement(new htmlOutputText(_('Filter'))); + $filterInput = new htmlInputField('filter'); + $filterInput->filterSelectBox('managedBy'); + $filterInput->setCSSClasses(['max-width-10']); + $filterGroup->addElement($filterInput); + $filterGroup->addElement(new htmlHelpLink('filter')); + $return->add($filterGroup); $return->addVerticalSpacer('2rem'); $buttonTable = new htmlGroup(); $buttonTable->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'set', _('Change'))); diff --git a/lam/lib/modules/windowsHost.inc b/lam/lib/modules/windowsHost.inc index b97932646..24b285422 100644 --- a/lam/lib/modules/windowsHost.inc +++ b/lam/lib/modules/windowsHost.inc @@ -108,6 +108,11 @@ class windowsHost extends baseModule { "Headline" => _('Logon count'), 'attr' => 'logonCount', "Text" => _('This is the number of logins performed by this account.') ], + 'filter' => [ + "Headline" => _("Filter"), + "Text" => _("Here you can enter a filter value. Only entries which contain the filter text will be shown.") + . ' ' . _('Possible wildcards are: "*" = any character, "^" = line start, "$" = line end') + ], ]; // upload fields $return['upload_columns'] = [ @@ -280,7 +285,15 @@ class windowsHost extends baseModule { $membersSelect->setRightToLeftTextDirection(true); $membersSelect->setSortElements(false); $membersSelect->setTransformSingleSelect(false); - $return->add($membersSelect, 12); + $return->add($membersSelect); + $filterGroup = new htmlGroup(); + $filterGroup->addElement(new htmlOutputText(_('Filter'))); + $filterInput = new htmlInputField('filter'); + $filterInput->filterSelectBox('managedBy'); + $filterInput->setCSSClasses(['max-width-10']); + $filterGroup->addElement($filterInput); + $filterGroup->addElement(new htmlHelpLink('filter')); + $return->add($filterGroup); $return->addVerticalSpacer('2rem'); $buttonTable = new htmlTable(); $buttonTable->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'set', _('Change'))); diff --git a/lam/lib/modules/windowsUser.inc b/lam/lib/modules/windowsUser.inc index 67d852497..63d5b1a2b 100644 --- a/lam/lib/modules/windowsUser.inc +++ b/lam/lib/modules/windowsUser.inc @@ -461,6 +461,11 @@ class windowsUser extends baseModule implements passwordService, AccountStatusPr "Headline" => _('Display format'), "Text" => _('Specifies how groups are displayed.') ], + 'filter' => [ + "Headline" => _("Filter"), + "Text" => _("Here you can enter a filter value. Only entries which contain the filter text will be shown.") + . ' ' . _('Possible wildcards are: "*" = any character, "^" = line start, "$" = line end') + ], ]; // upload fields $return['upload_columns'] = [ @@ -2560,6 +2565,14 @@ class windowsUser extends baseModule implements passwordService, AccountStatusPr $managerSelect->setSortElements(false); $managerSelect->setTransformSingleSelect(false); $return->add($managerSelect); + $filterGroup = new htmlGroup(); + $filterGroup->addElement(new htmlOutputText(_('Filter'))); + $filterInput = new htmlInputField('filter'); + $filterInput->filterSelectBox('manager'); + $filterInput->setCSSClasses(['max-width-10']); + $filterGroup->addElement($filterInput); + $filterGroup->addElement(new htmlHelpLink('filter')); + $return->add($filterGroup); $return->addVerticalSpacer('2rem'); $buttonTable = new htmlGroup(); $buttonTable->addElement(new htmlAccountPageButton(static::class, 'attributes', 'setManager', _('Change')));