Skip to content
Snippets Groups Projects
Commit 22ede859 authored by Christian Eßl's avatar Christian Eßl Committed by Annett Jähnichen
Browse files

[TASK] Improve the save notification in mass editing mode

The new save notification currently lists all changes separately,
when editing records in EditDocumentController.
This leads to a huge notification box, when saving many records
at once.

The behaviour is now changed so that if more than 10 records
were edited, a more generic message is shown instead:

"x records have been successfully saved."

Resolves: #100223
Releases: main, 12.4
Change-Id: Ic3db6a1937de8eb288a7ded0bce3e1a88f10cb1e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79686


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAnnett Jähnichen <mcmietz@web.de>
Reviewed-by: default avatarAnnett Jähnichen <mcmietz@web.de>
parent 4c40d747
Branches
Tags
No related merge requests found
......@@ -683,6 +683,9 @@ class EditDocumentController
if (count($messages) === 1) {
$label = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:notification.record_saved.title.singular');
}
if (count($messages) > 10) {
$messages = [sprintf($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:notification.mass_saving.message'), count($messages))];
}
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(FlashMessageQueue::NOTIFICATION_QUEUE);
$flashMessage = GeneralUtility::makeInstance(
......
......@@ -153,6 +153,9 @@
<trans-unit id="notification.record_saved.message" resname="notification.record_saved.message">
<source>Record "%s" has been successfully saved.</source>
</trans-unit>
<trans-unit id="notification.mass_saving.message" resname="notification.mass_saving.message">
<source>%s records have been successfully saved.</source>
</trans-unit>
<trans-unit id="search.find_record" resname="search.find_record">
<source>Find records</source>
</trans-unit>
......
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