Skip to content
Snippets Groups Projects
Commit 1b4fa778 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Properly handle form state

A couple for form elements, such as checkboxes
and inline elements used the `form-legend` class
on a <legend> instead of `form-label` on a `<label>`
to describe the corresponding form field.

This patch now unifies this, merging the
special `form-legend` together with the existing
`form-label` class. This also leads to the same
migration done for the corresponding JS selector
class `.t3js-formengine-legend`.

On changing a file, inline or site language
element the `has-change` class is now also
properly added again, using the corresponding
FormEngine API.

This API however is changed to add the class
not to a container but to the corresponding fields
and their associated label to prevent wrong
inheritance of those  styles, which occurred e.g.
in inline elements.

Finally, a possible null pointer exception is
fixed by using the remove() API to remove a
record container. The previously approach
seemed to be vulnerable to timing issues.

Resolves: #105096
Resolved: #105110
Releases: main
Change-Id: Ic144e89a0ea111fc159012b8540bf1dfbf07a4ad
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86307


Tested-by: default avatarAndreas Kienast <akienast@scripting-base.de>
Reviewed-by: default avatarAndreas Kienast <akienast@scripting-base.de>
Tested-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent f6abff5a
Branches
No related merge requests found
Showing
with 42 additions and 52 deletions
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