Skip to content

Commit

Permalink
[BUGFIX] Remove wrong data-formengine-input-name attribute
Browse files Browse the repository at this point in the history
With #93135, selectMultipleSideBySide fields broke and didn't accept new
values as both select fields share the same `data-formengine-input-name`
which confuses the changed CSS selector.

This patch removes the attribute from the "value provider" fields as
it's not required there at all and also adapt FormEngine to not
use the styling related form-select class.

Resolves: #93213
Resolves: #93214
Related: #93135
Releases: master
Change-Id: I2cf4ad6ff4d78072bf5474d7393ad4eb7f771070
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67335
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
  • Loading branch information
andreaskienast authored and bnf committed Jan 4, 2021
1 parent fdcb412 commit 9821608
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ public function render()
$html[] = ' data-relatedfieldname="' . htmlspecialchars($elementName) . '"';
$html[] = ' data-exclusivevalues="' . htmlspecialchars($config['exclusiveKeys']) . '"';
$html[] = ' id="' . $availableOptionsFieldId . '"';
$html[] = ' data-formengine-input-name="' . htmlspecialchars($elementName) . '"';
$html[] = ' class="form-select t3js-formengine-select-itemstoselect"';
$html[] = ' size="' . $size . '"';
$html[] = ' onchange="' . htmlspecialchars(implode('', $parameterArray['fieldChangeFunc'])) . '"';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ define(['jquery',
var $fieldEl;
switch (appendix) {
case '_list':
$fieldEl = $(':input.form-select[data-formengine-input-name="' + fieldName + '"]', $formEl);
$fieldEl = $(':input[data-formengine-input-name="' + fieldName + '"]:not([type=hidden])', $formEl);
break;
case '_avail':
$fieldEl = $(':input[data-relatedfieldname="' + fieldName + '"]', $formEl);
Expand Down

0 comments on commit 9821608

Please sign in to comment.