Commit 1c606e7c authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benjamin Franzke
Browse files

[FEATURE] Add reset button for EXT:beuser module filter

Since the EXT:beuser module filter contains of a couple of
filter options, which are not automatically reset on leaving the
module, because they are stored in the user uc, one had to
change every option manually to reset the whole filter.

Therefore, a new button is now introduced, which allows to
reset the whole filter at once.

Resolves: #93117
Releases: master
Change-Id: I38d49749ef461d4c2f81957a85ca93290fcad019
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67190

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarJosef Glatz <josefglatz@gmail.com>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
parent 6a5e2d40
......@@ -139,9 +139,16 @@ class BackendUserController extends ActionController
*
* @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
* @param int $currentPage
* @param string $operation
*/
public function indexAction(Demand $demand = null, int $currentPage = 1): ResponseInterface
public function indexAction(Demand $demand = null, int $currentPage = 1, string $operation = ''): ResponseInterface
{
if ($operation === 'reset-filters') {
// Reset the module data demand object
$this->moduleData->setDemand(GeneralUtility::makeInstance(Demand::class));
$this->moduleDataStorageService->persistModuleData($this->moduleData);
$demand = null;
}
if ($demand === null) {
$demand = $this->moduleData->getDemand();
} else {
......
......@@ -120,6 +120,9 @@
<trans-unit id="filter" resname="filter">
<source>Filter</source>
</trans-unit>
<trans-unit id="reset" resname="reset">
<source>Reset</source>
</trans-unit>
<trans-unit id="reallyLogout" resname="reallyLogout">
<source>Really logout</source>
</trans-unit>
......
......@@ -47,6 +47,7 @@
/>
</div>
<div class="form-group">
<f:form.submit value="{f:translate(key: 'filter')}" class="btn btn-default btn-sm" />
<f:form.button type="submit" name="operation" value="filter" class="btn btn-light">{f:translate(key: 'filter')}</f:form.button>
<f:form.button type="submit" name="operation" value="reset-filters" class="btn btn-outline-light">{f:translate(key: 'reset')}</f:form.button>
</div>
</f:form>
.. include:: ../../Includes.txt
================================================================
Feature: #93117 - Add reset button to Backend User module filter
================================================================
See :issue:`93117`
Description
===========
The backend user module provides a filter functionality with a
couple of options to filter for. The filter state (selected options)
is therefore also saved in the backend user settings, which means,
the filter state will remain after switching to another module.
Since there are a lot of filter options which previously had to be
reset one by one, a new reset button is now introduced. This button
allows to reset the whole filter at once.
Impact
======
It's now possible to reset the whole backend user module filter
at once, using the new reset button.
.. index:: Backend, ext:beuser
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment