Added filters above the admin list views to resolve gh-378
This commit is contained in:
@ -2098,8 +2098,15 @@ class ComponentbuilderModelJoomla_components 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);
|
||||
@ -2117,19 +2124,39 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$companyname = $this->getUserStateFromRequest($this->context . '.filter.companyname', 'filter_companyname');
|
||||
$this->setState('filter.companyname', $companyname);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$companyname = $app->input->post->get('companyname');
|
||||
$this->setState('filter.companyname', $companyname);
|
||||
}
|
||||
|
||||
$author = $this->getUserStateFromRequest($this->context . '.filter.author', 'filter_author');
|
||||
$this->setState('filter.author', $author);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$author = $app->input->post->get('author');
|
||||
$this->setState('filter.author', $author);
|
||||
}
|
||||
|
||||
$system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$system_name = $app->input->post->get('system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
}
|
||||
|
||||
$name_code = $this->getUserStateFromRequest($this->context . '.filter.name_code', 'filter_name_code');
|
||||
$this->setState('filter.name_code', $name_code);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name_code = $app->input->post->get('name_code');
|
||||
$this->setState('filter.name_code', $name_code);
|
||||
}
|
||||
|
||||
$short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description');
|
||||
$this->setState('filter.short_description', $short_description);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$short_description = $app->input->post->get('short_description');
|
||||
$this->setState('filter.short_description', $short_description);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
|
Reference in New Issue
Block a user