added filter function to html.inc
This commit is contained in:
parent
fcd03fd509
commit
e8ede90eb5
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2010 - 2014 Roland Gruber
|
Copyright (C) 2010 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -767,6 +767,16 @@ class htmlInputField extends htmlElement {
|
||||||
$this->sameValueFieldID = $sameValueFieldID;
|
$this->sameValueFieldID = $sameValueFieldID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns this field into a live filter for a select box.
|
||||||
|
* Cannot be used together with setOnKeyUp().
|
||||||
|
*
|
||||||
|
* @param String $name select box name
|
||||||
|
*/
|
||||||
|
public function filterSelectBox($name) {
|
||||||
|
$this->setOnKeyUp('filterSelect(\'' . $this->fieldName . '\', \'' . $name . '\', event);');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,7 +117,7 @@ class nisNetGroupHost extends nisNetGroupUser {
|
||||||
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
||||||
$filter = new htmlInputField('group_filter');
|
$filter = new htmlInputField('group_filter');
|
||||||
$filter->setFieldSize('5em');
|
$filter->setFieldSize('5em');
|
||||||
$filter->setOnKeyUp('filterSelect(\'group_filter\', \'group_add\', event);');
|
$filter->filterSelectBox('group_add');
|
||||||
$filterGroup->addElement($filter);
|
$filterGroup->addElement($filter);
|
||||||
$return->addElement($filterGroup, true);
|
$return->addElement($filterGroup, true);
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ class nisNetGroupUser extends baseModule {
|
||||||
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
||||||
$filter = new htmlInputField('group_filter');
|
$filter = new htmlInputField('group_filter');
|
||||||
$filter->setFieldSize('5em');
|
$filter->setFieldSize('5em');
|
||||||
$filter->setOnKeyUp('filterSelect(\'group_filter\', \'group_add\', event);');
|
$filter->filterSelectBox('group_add');
|
||||||
$filterGroup->addElement($filter);
|
$filterGroup->addElement($filter);
|
||||||
$return->addElement($filterGroup, true);
|
$return->addElement($filterGroup, true);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2013 - 2015 Roland Gruber
|
Copyright (C) 2013 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -649,7 +649,7 @@ class windowsGroup extends baseModule {
|
||||||
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
$filterGroup->addElement(new htmlOutputText(_('Filter') . ' '));
|
||||||
$filter = new htmlInputField('windows_filter');
|
$filter = new htmlInputField('windows_filter');
|
||||||
$filter->setFieldSize('5em');
|
$filter->setFieldSize('5em');
|
||||||
$filter->setOnKeyUp('filterSelect(\'windows_filter\', \'members\', event);');
|
$filter->filterSelectBox('members');
|
||||||
$filterGroup->addElement($filter);
|
$filterGroup->addElement($filter);
|
||||||
$return->addElement($filterGroup, true);
|
$return->addElement($filterGroup, true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue