diff --git a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php index cb983ecfac8deeff94c9507bcc73ae567c986b49..94935d01fec6ba92e20001db7356241f7bff5cd8 100644 --- a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php @@ -295,7 +295,7 @@ abstract class AbstractFormElement extends AbstractNode { if (isset($wizardConfiguration['popup_onlyOpenIfSelected']) && $wizardConfiguration['popup_onlyOpenIfSelected']) { $notSelectedText = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:mess.noSelItemForEdit'); $onlyIfSelectedJS = - 'if (!TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName . $listFlag) . ')){' . + 'if (!TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName) . ')){' . 'alert(' . GeneralUtility::quoteJSvalue($notSelectedText) . ');' . 'return false;' . '}'; @@ -306,7 +306,7 @@ abstract class AbstractFormElement extends AbstractNode { 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url) . '+\'&P[currentValue]=\'+TBE_EDITOR.rawurlencode(' . 'document.editform[' . GeneralUtility::quoteJSvalue($itemName) . '].value,200' . ')' . - '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName . $listFlag) . '),' . + '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName) . '),' . GeneralUtility::quoteJSvalue('popUp' . $md5ID) . ',' . GeneralUtility::quoteJSvalue($wizardConfiguration['JSopenParams']) . ');' . @@ -351,7 +351,7 @@ abstract class AbstractFormElement extends AbstractNode { 'vHWin=window.open('. GeneralUtility::quoteJSvalue($url) . '+\'&P[currentValue]=\'+TBE_EDITOR.rawurlencode(' . 'document.editform[' . GeneralUtility::quoteJSvalue($itemName) . '].value,200' . ')' . - '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName . $listFlag) . '),' . + '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(' . GeneralUtility::quoteJSvalue($itemName) . '),' . GeneralUtility::quoteJSvalue('popUp' . $md5ID) . ',' . GeneralUtility::quoteJSvalue($wizardConfiguration['JSopenParams']) . ');' . diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js b/typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js index dd23dd60636582610b422440cc92a11f073cc46a..c3ac59f29306176d4dda8a1b72c5b8213c842dae 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js @@ -276,7 +276,7 @@ var TBE_EDITOR = { return (theStr.substring(sPos+lengthOfDelim,ePos)); }, curSelected: function(theField) { - var fObjSel = document[TBE_EDITOR.formname][theField]; + var fObjSel = TYPO3.jQuery('select[data-formengine-input-name="' + theField + '"]').get(0); var retVal=""; if (fObjSel) { if (fObjSel.type=='select-multiple' || fObjSel.type=='select-one') {