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/59778
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Feb 21, 2019
1 parent 1d478a4 commit 3acaf93
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 3acaf93

Please sign in to comment.