Added filters above the admin list views to resolve gh-378
This commit is contained in:
@ -62,8 +62,15 @@ class ComponentbuilderModelCustom_codes 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);
|
||||
@ -81,19 +88,39 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$component = $this->getUserStateFromRequest($this->context . '.filter.component', 'filter_component');
|
||||
$this->setState('filter.component', $component);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$component = $app->input->post->get('component');
|
||||
$this->setState('filter.component', $component);
|
||||
}
|
||||
|
||||
$target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target');
|
||||
$this->setState('filter.target', $target);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$target = $app->input->post->get('target');
|
||||
$this->setState('filter.target', $target);
|
||||
}
|
||||
|
||||
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
|
||||
$this->setState('filter.type', $type);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$type = $app->input->post->get('type');
|
||||
$this->setState('filter.type', $type);
|
||||
}
|
||||
|
||||
$comment_type = $this->getUserStateFromRequest($this->context . '.filter.comment_type', 'filter_comment_type');
|
||||
$this->setState('filter.comment_type', $comment_type);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$comment_type = $app->input->post->get('comment_type');
|
||||
$this->setState('filter.comment_type', $comment_type);
|
||||
}
|
||||
|
||||
$path = $this->getUserStateFromRequest($this->context . '.filter.path', 'filter_path');
|
||||
$this->setState('filter.path', $path);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$path = $app->input->post->get('path');
|
||||
$this->setState('filter.path', $path);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
|
Reference in New Issue
Block a user