Commit 2da6a371 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Anja Leichsenring
Browse files

[!!!][TASK] Drop FormEngine popup configuration

The options `options.popupWindowSize` and `options.rte.popupWindowSize`
used to configure popup sizes have been removed.

Most of the popups are rendered as modals that don't allow configured
sizes, the remaining popups have hardcoded sizes.

Resolves: #88657
Releases: master
Change-Id: Ide212d0669e8c4bc199263c5fe868529cbbc7930
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61195

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Björn Jacob's avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: default avatarJohannes Seipelt <johannes.seipelt@3m5.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent eff8bbd4
......@@ -219,40 +219,12 @@ class FormResultCompiler
}
$backendUser = $this->getBackendUserAuthentication();
// define the window size of the element browser etc.
$popupWindowWidth = 800;
$popupWindowHeight = 600;
$popupWindowSize = trim($backendUser->getTSConfig()['options.']['popupWindowSize'] ?? '');
if (!empty($popupWindowSize)) {
list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::intExplode('x', $popupWindowSize);
}
// define the window size of the popups within the RTE
$rtePopupWindowSize = trim($backendUser->getTSConfig()['options.']['rte.']['popupWindowSize'] ?? '');
if (!empty($rtePopupWindowSize)) {
list($rtePopupWindowWidth, $rtePopupWindowHeight) = GeneralUtility::trimExplode('x', $rtePopupWindowSize);
}
$rtePopupWindowWidth = !empty($rtePopupWindowWidth) ? (int)$rtePopupWindowWidth : $popupWindowWidth;
$rtePopupWindowHeight = !empty($rtePopupWindowHeight) ? (int)$rtePopupWindowHeight : $popupWindowHeight;
// Make textareas resizable and flexible ("autogrow" in height)
$textareaSettings = [
'autosize' => (bool)$backendUser->uc['resizeTextareas_Flexible'],
'RTEPopupWindow' => [
'width' => $rtePopupWindowWidth,
'height' => $rtePopupWindowHeight
]
];
$pageRenderer->addInlineSettingArray('Textarea', $textareaSettings);
$popupSettings = [
'PopupWindow' => [
'width' => $popupWindowWidth,
'height' => $popupWindowHeight
]
];
$pageRenderer->addInlineSettingArray('Popup', $popupSettings);
$pageRenderer->addJsFile('EXT:backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js');
// Needed for FormEngine manipulation (date picker)
$dateFormat = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? ['MM-DD-YYYY', 'HH:mm MM-DD-YYYY'] : ['DD-MM-YYYY', 'HH:mm DD-MM-YYYY']);
......
.. include:: ../../Includes.txt
============================================================
Breaking: #88657 - Popup configuration in FormEngine dropped
============================================================
See :issue:`88657`
Description
===========
The options :ts:`options.popupWindowSize` and :ts:`options.rte.popupWindowSize` used to configure popup sizes have been
removed.
Impact
======
These options are not evaluated anymore.
Affected Installations
======================
All installations using 3rd party extensions relying on the options are affected.
Migration
=========
In most cases it's fine to remove the configuration.
In the unlikely case one is negatively affected by this change, fetch the configuration from backend user's TSConfig and
use it where it is required.
.. index:: Backend, RTE, TSConfig, NotScanned, ext:backend
......@@ -123,23 +123,11 @@ class FormEditorController extends AbstractBackendController
$this->getPageRenderer()->addInlineLanguageLabelFile('EXT:form/Resources/Private/Language/locallang_formEditor_failSafeErrorHandling_javascript.xlf');
$popupWindowWidth = 700;
$popupWindowHeight = 750;
$popupWindowSize = \trim($this->getBackendUser()->getTSConfig()['options.']['popupWindowSize'] ?? '');
if (!empty($popupWindowSize)) {
list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::intExplode('x', $popupWindowSize);
}
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$addInlineSettings = [
'FormEditor' => [
'typo3WinBrowserUrl' => (string)$uriBuilder->buildUriFromRoute('wizard_element_browser'),
],
'Popup' => [
'PopupWindow' => [
'width' => $popupWindowWidth,
'height' => $popupWindowHeight
],
]
];
$addInlineSettings = array_replace_recursive(
......
......@@ -80,7 +80,6 @@
openElementBrowser(
editor,
editor.lang.link.toolbar,
TYPO3.settings.Textarea.RTEPopupWindow.height,
makeUrlFromModulePath(
editor,
editor.config.typo3link.routeUrl,
......@@ -111,10 +110,9 @@
*
* @param {Object} editor The CKEditor instance
* @param {String} title The window title (will be localized here)
* @param {Integer} height The height of the containing iframe
* @param {String} url The url to load ino the iframe
*/
function openElementBrowser(editor, title, height, url) {
function openElementBrowser(editor, title, url) {
require([
'jquery',
'TYPO3/CMS/Backend/Modal'
......
Supports Markdown
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