diff --git a/typo3/sysext/form/Classes/Controller/FormEditorController.php b/typo3/sysext/form/Classes/Controller/FormEditorController.php index 115cf6039619965f4b749ac0b2ee5ee1dde0b583..7071fdf69963f1c9ff7930302e1cf17a795e2fb7 100644 --- a/typo3/sysext/form/Classes/Controller/FormEditorController.php +++ b/typo3/sysext/form/Classes/Controller/FormEditorController.php @@ -120,12 +120,9 @@ class FormEditorController extends AbstractBackendController 'maximumUndoSteps' => $this->prototypeConfiguration['formEditor']['maximumUndoSteps'], ]; - $this->view->assign('stylesheets', $this->resolveResourcePaths($this->prototypeConfiguration['formEditor']['stylesheets'])); $this->view->assign('formEditorTemplates', $this->renderFormEditorTemplates($formEditorDefinitions)); $this->view->assign('dynamicRequireJsModules', $this->prototypeConfiguration['formEditor']['dynamicRequireJsModules']); - $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:form/Resources/Private/Language/locallang_formEditor_failSafeErrorHandling_javascript.xlf'); - $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); $addInlineSettings = [ 'FormEditor' => [ @@ -143,8 +140,6 @@ class FormEditorController extends AbstractBackendController $formDefinition['label'] ); - $this->view->assign('addInlineSettings', $addInlineSettings); - $formEditorAppInitialData = json_encode($formEditorAppInitialData); if ($formEditorAppInitialData === false) { throw new Exception('The form editor app data could not be encoded', 1628677079); @@ -158,7 +153,15 @@ class FormEditorController extends AbstractBackendController viewModel ).run(); });'; - $this->getPageRenderer()->addJsInlineCode('formEditorIndex', $script); + + $pageRenderer = $this->getPageRenderer(); + $pageRenderer->addJsInlineCode('formEditorIndex', $script); + $pageRenderer->addInlineSettingArray(null, $addInlineSettings); + $pageRenderer->addInlineLanguageLabelFile('EXT:form/Resources/Private/Language/locallang_formEditor_failSafeErrorHandling_javascript.xlf'); + $stylesheets = $this->resolveResourcePaths($this->prototypeConfiguration['formEditor']['stylesheets']); + foreach ($stylesheets as $stylesheet) { + $pageRenderer->addCssFile($stylesheet); + } return $this->htmlResponse(); } diff --git a/typo3/sysext/form/Resources/Private/Backend/Layouts/FormEditor.html b/typo3/sysext/form/Resources/Private/Backend/Layouts/FormEditor.html index 23d1b7a6b4d5eae7de28b124439fb32fe9a40171..801803054b0ddc48ea4a88e31d1eabf1729ebf8a 100644 --- a/typo3/sysext/form/Resources/Private/Backend/Layouts/FormEditor.html +++ b/typo3/sysext/form/Resources/Private/Backend/Layouts/FormEditor.html @@ -1,5 +1,4 @@ <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> -<f:be.pageRenderer includeCssFiles="{stylesheets}" addInlineSettings="{addInlineSettings}" includeJsFiles="{0: 'EXT:backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js'}" /> <div data-identifier="moduleLoadingIndicator" class="form-editor-loading-spinner"> <core:icon identifier="spinner-circle-dark" size="default" /> <div class="form-editor-loading-spinner-label"><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.loading" /></div>