Skip to content

Commit

Permalink
[BUGFIX] Prevent empty new form from being closed without confirmation
Browse files Browse the repository at this point in the history
Set ‘has-change’ on new empty content element form container
to trigger the confirmation dialog when using ‘Close’.

Resolves: #87890
Releases: master, 9.5
Change-Id: Idc3d8fdca0f865991ee09935f4b75683dffb4d7e
Reviewed-on: https://review.typo3.org/c/60237
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
  • Loading branch information
wazum authored and ervaude committed Mar 16, 2019
1 parent d5dd942 commit 521ecb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -144,7 +144,8 @@ public function render()
'childHtml' => $childHtml,
'icon' => $icon,
'tableTitle' => $tableTitle,
'newOrUid' => $newOrUid
'newOrUid' => $newOrUid,
'isNewRecord' => $this->data['command'] === 'new'
]);
$result['html'] = $view->render();
return $result;
Expand Down
Expand Up @@ -11,7 +11,7 @@ <h1><f:format.raw>{pageTitle}</f:format.raw></h1>
</f:be.infobox>
</f:if>

<div class="typo3-TCEforms">
<div class="typo3-TCEforms{f:if(condition:isNewRecord, then:' has-change')}">
<f:format.raw>{fieldInformationHtml}</f:format.raw>
<f:format.raw>{fieldWizardHtml}</f:format.raw>
<f:format.raw>{childHtml}</f:format.raw>
Expand Down

0 comments on commit 521ecb2

Please sign in to comment.