Skip to content

Commit

Permalink
[BUGFIX] Do not render unused attribute in Checkbox element
Browse files Browse the repository at this point in the history
Due to refactoring in FormEngine back in 2015, the Checkbox
Element renders " ... 1 ... " when a checkbox element is not
disabled.

To overcome this, the ternary operator is turned around,
returning an empty string when the element is not disabled.

Resolves: #87754
Releases: master, 9.5
Change-Id: Ic5fad1335fbdf1ed76523f598c20f66bfe195686
Reviewed-on: https://review.typo3.org/c/59774
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
  • Loading branch information
bmack authored and liayn committed Feb 21, 2019
1 parent 27937f7 commit 8ca7ec1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -201,7 +201,7 @@ class="checkbox-input"
value="1"
data-formengine-input-name="' . htmlspecialchars($additionalInformation['itemFormElName']) . '"
' . $checkboxParameters . '
' . (!$disabled ?: ' disabled="disabled"') . '
' . ($disabled ? ' disabled="disabled"' : '') . '
id="' . $checkboxId . '" />
<label class="checkbox-label" for="' . $checkboxId . '">
<span class="checkbox-label-icon">
Expand Down

0 comments on commit 8ca7ec1

Please sign in to comment.