Skip to content
Snippets Groups Projects
Commit 3a2f2343 authored by Xavier Perseguers's avatar Xavier Perseguers Committed by Markus Klein
Browse files

[BUGFIX] TCEForms.suggest JS code is broken

This is a follow-up for Change-Id Ic27125d0a901aee10461f88ea49c0f354cb43a54.

Resolves: #64360
Releases: 6.1
Change-Id: Ifb74afdf926ed7ebbff11818465b3a73c74064d1
Reviewed-on: http://review.typo3.org/36106


Reviewed-by: default avatarXavier Perseguers <xavier@typo3.org>
Tested-by: default avatarXavier Perseguers <xavier@typo3.org>
Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
parent 718c0cf8
No related merge requests found
......@@ -114,7 +114,7 @@ class SuggestElement {
// Replace "-" with ucwords for the JS object name
$jsObj = str_replace(' ', '', ucwords(str_replace('-', ' ', \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($suggestId))));
$this->TCEformsObj->additionalJS_post[] = '
var ' . $jsObj . ' = new TCEForms.Suggest("' . $fieldname . '", "' . $table . '", "' . $field . '", "' . $row['uid'] . '", ' . $row['pid'] . ', ' . $minChars . '", ' . GeneralUtility::quoteJSvalue($jsRow) . ');' . LF
var ' . $jsObj . ' = new TCEForms.Suggest("' . $fieldname . '", "' . $table . '", "' . $field . '", "' . $row['uid'] . '", ' . $row['pid'] . ', ' . $minChars . ', ' . GeneralUtility::quoteJSvalue($jsRow) . ');' . LF
. $jsObj . '.defaultValue = "' . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.findRecord')) . '";' . LF;
return $selector;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment