[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:Andreas Kienast <akienast@scripting-base.de> Reviewed-by:
Andreas Kienast <akienast@scripting-base.de> Tested-by:
Benjamin Kott <benjamin.kott@outlook.com> Reviewed-by:
Benjamin Kott <benjamin.kott@outlook.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- Build/Sources/Sass/component/_form.scss 0 additions, 1 deletionBuild/Sources/Sass/component/_form.scss
- Build/Sources/Sass/component/_root.scss 0 additions, 3 deletionsBuild/Sources/Sass/component/_root.scss
- Build/Sources/Sass/component/forms/_form-label.scss 5 additions, 1 deletionBuild/Sources/Sass/component/forms/_form-label.scss
- Build/Sources/Sass/component/forms/_form-legend.scss 0 additions, 10 deletionsBuild/Sources/Sass/component/forms/_form-legend.scss
- Build/Sources/Sass/component/forms/_form-validation.scss 4 additions, 0 deletionsBuild/Sources/Sass/component/forms/_form-validation.scss
- Build/Sources/TypeScript/backend/form-engine-review.ts 1 addition, 6 deletionsBuild/Sources/TypeScript/backend/form-engine-review.ts
- Build/Sources/TypeScript/backend/form-engine-validation.ts 4 additions, 3 deletionsBuild/Sources/TypeScript/backend/form-engine-validation.ts
- Build/Sources/TypeScript/backend/form-engine.ts 1 addition, 1 deletionBuild/Sources/TypeScript/backend/form-engine.ts
- Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts 3 additions, 3 deletions.../backend/form-engine/container/files-control-container.ts
- Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts 4 additions, 4 deletions...backend/form-engine/container/inline-control-container.ts
- Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts 3 additions, 3 deletions.../backend/form-engine/container/site-language-container.ts
- Build/Sources/TypeScript/backend/form-engine/element/table-wizard-element.ts 3 additions, 3 deletions...cript/backend/form-engine/element/table-wizard-element.ts
- typo3/sysext/backend/Classes/Form/Container/AbstractContainer.php 1 addition, 1 deletion...sext/backend/Classes/Form/Container/AbstractContainer.php
- typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php 1 addition, 1 deletion...sext/backend/Classes/Form/Element/AbstractFormElement.php
- typo3/sysext/backend/Classes/Form/Element/TablePermissionElement.php 1 addition, 1 deletion...t/backend/Classes/Form/Element/TablePermissionElement.php
- typo3/sysext/backend/Classes/Form/FieldWizard/LocalizationStateSelector.php 1 addition, 1 deletion...nd/Classes/Form/FieldWizard/LocalizationStateSelector.php
- typo3/sysext/backend/Resources/Public/Css/backend.css 7 additions, 7 deletionstypo3/sysext/backend/Resources/Public/Css/backend.css
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine-review.js 1 addition, 1 deletion...backend/Resources/Public/JavaScript/form-engine-review.js
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine-validation.js 1 addition, 1 deletion...end/Resources/Public/JavaScript/form-engine-validation.js
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js 1 addition, 1 deletion...sysext/backend/Resources/Public/JavaScript/form-engine.js
Please register or sign in to comment