Commit 5771457d authored by Tymoteusz Motylewski's avatar Tymoteusz Motylewski Committed by Susanne Moog
Browse files

[BUGFIX] Redirect to the list after save&close in text file edit form

Clicking on the Save & Close button in the FileList
text file editing form redirects back to the list view.

Releases: master
Resolves: #83090
Change-Id: I14576da7a77835232ca9573a8964f0d754f52aff
Reviewed-on: https://review.typo3.org/54757


Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
parent 3907e862
......@@ -302,20 +302,19 @@ class EditFileController
$saveButton = $buttonBar->makeInputButton()
->setName('_save')
->setValue('1')
->setOnClick('document.editform.submit();')
->setForm('EditFileController')
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_edit.php.submit'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL));
// Save and Close button
$saveAndCloseButton = $buttonBar->makeInputButton()
->setName('_saveandclose')
->setName('_saveandclosedok')
->setValue('1')
->setForm('EditFileController')
->setOnClick(
'document.editform.redirect.value='
'document.editform.elements.namedItem("data[editfile][0][redirect]").value='
. GeneralUtility::quoteJSvalue($this->returnUrl)
. '; document.editform.submit();'
. ';'
)
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_edit.php.saveAndClose'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
......
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