Skip to content

Commit

Permalink
#354 added filters
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberroland committed Aug 16, 2024
1 parent ac4175b commit 536ddda
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
15 changes: 14 additions & 1 deletion lam/lib/modules/inetOrgPerson.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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')));
Expand Down
15 changes: 14 additions & 1 deletion lam/lib/modules/windowsGroup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [
Expand Down Expand Up @@ -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')));
Expand Down
15 changes: 14 additions & 1 deletion lam/lib/modules/windowsHost.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [
Expand Down Expand Up @@ -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')));
Expand Down
13 changes: 13 additions & 0 deletions lam/lib/modules/windowsUser.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [
Expand Down Expand Up @@ -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')));
Expand Down

0 comments on commit 536ddda

Please sign in to comment.