Added filters above the admin list views to resolve gh-378
This commit is contained in:
@ -60,8 +60,15 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
@ -79,13 +86,25 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$visibility = $app->input->post->get('visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
}
|
||||
|
||||
$extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$extension_type = $app->input->post->get('extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
|
Reference in New Issue
Block a user