Commit bc02da7d authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[!!!][TASK] Drop resizable textarea user setting

The 'Make textareas resizable' setting is quite ancient.
The patch drops this option from the user settings and
enables 'growing' text areas by default. To prevent text
areas from growing indefinitely, the user setting
'max height' with a default of 500px is kept.

Change-Id: I0497c6823b96b077c05d25a2e63ae58c079400b7
Resolves: #92582
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66162

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 3c802928
......@@ -20,10 +20,8 @@ export class Resizable {
* @param {HTMLTextAreaElement} textarea
*/
public static enable(textarea: HTMLTextAreaElement): void {
if (TYPO3.settings.Textarea && TYPO3.settings.Textarea.autosize) {
require(['autosize'], (autosize: Function): void => {
autosize(textarea);
});
}
require(['autosize'], (autosize: Function): void => {
autosize(textarea);
});
}
}
......@@ -207,13 +207,6 @@ class FormResultCompiler
$pageRenderer->loadRequireJsModule($moduleName, $callback);
}
}
$backendUser = $this->getBackendUserAuthentication();
// Make textareas resizable and flexible ("autogrow" in height)
$textareaSettings = [
'autosize' => (bool)$backendUser->uc['resizeTextareas_Flexible'],
];
$pageRenderer->addInlineSettingArray('Textarea', $textareaSettings);
$pageRenderer->addJsFile('EXT:backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js');
// Needed for FormEngine manipulation (date picker)
......
......@@ -10,4 +10,4 @@
*
* The TYPO3 project - inspiring people to share!
*/
define(["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resizable=void 0;t.Resizable=class{static enable(t){TYPO3.settings.Textarea&&TYPO3.settings.Textarea.autosize&&e(["autosize"],e=>{e(t)})}}}));
\ No newline at end of file
define(["require","exports"],(function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Resizable=void 0;i.Resizable=class{static enable(i){e(["autosize"],e=>{e(i)})}}}));
\ No newline at end of file
......@@ -293,9 +293,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
'titleLen' => 50,
'edit_RTE' => '1',
'edit_docModuleUpload' => '1',
'resizeTextareas' => 1,
'resizeTextareas_MaxHeight' => 500,
'resizeTextareas_Flexible' => 0
];
/**
......
.. include:: ../../Includes.txt
===========================================================
Breaking: #92582 - Resizable text area user setting dropped
===========================================================
See :issue:`92582`
Description
===========
The user setting "Make text areas flexible" has been dropped and is
no longer available for editors.
When editing records in the backend, text areas now always grow in height up to
the maximum height defined by the 'maximum text area height' in user settings.
Impact
======
The backend is a little less restricted for editors.
Affected Installations
======================
All instances are affected.
Migration
=========
The option has been removed, there is no migration path.
The following User TSconfig settings are obsolete and should be removed:
* :typoscript:`setup.default.resizeTextareas_Flexible`
* :typoscript:`setup.override.resizeTextareas_Flexible`
* :typoscript:`setup.fields.resizeTextareas_Flexible.disabled`
.. index:: Backend, TSConfig, NotScanned, ext:backend
......@@ -258,17 +258,8 @@
<trans-unit id="showHiddenFilesAndFolders" resname="showHiddenFilesAndFolders">
<source>Show hidden files and folders in the filelist</source>
</trans-unit>
<trans-unit id="resizeTextareas" resname="resizeTextareas">
<source>Make Textareas resizable</source>
</trans-unit>
<trans-unit id="resizeTextareas_MaxHeight" resname="resizeTextareas_MaxHeight">
<source>Maximal Height of resizable Textarea in Pixel</source>
</trans-unit>
<trans-unit id="flexibleTextareas_MaxHeight" resname="flexibleTextareas_MaxHeight">
<source>Maximal Height of flexible Textareas in Pixel</source>
</trans-unit>
<trans-unit id="resizeTextareas_Flexible" resname="resizeTextareas_Flexible">
<source>Make Textareas flexible</source>
<source>Maximum height of text areas in pixels</source>
</trans-unit>
<trans-unit id="editFunctionsTab" resname="editFunctionsTab">
<source>Edit and Advanced functions</source>
......
......@@ -99,29 +99,11 @@ The default module is "About Modules".</source>
<source>EXT:setup/Resources/Public/Images/cshimages/setup12.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="option_resizeTextareas.alttitle" resname="option_resizeTextareas.alttitle">
<source>Make Textareas Resizable</source>
</trans-unit>
<trans-unit id="option_resizeTextareas.description" resname="option_resizeTextareas.description">
<source>This option will make textareas resizable. You will see the resize mouse cursor if you move mouse to the outer border of textarea.</source>
</trans-unit>
<trans-unit id="option_resizeTextareas_MaxHeight.alttitle" resname="option_resizeTextareas_MaxHeight.alttitle">
<source>Maximal Height of Textarea</source>
</trans-unit>
<trans-unit id="option_flexibleTextareas_MaxHeight.alttitle" resname="option_flexibleTextareas_MaxHeight.alttitle">
<source>Maximal Height of flexible textareas</source>
</trans-unit>
<trans-unit id="option_resizeTextareas_MaxHeight.description" resname="option_resizeTextareas_MaxHeight.description">
<source>Define the maximal height of textarea (in Pixel).</source>
<source>Maximum height of text areas</source>
</trans-unit>
<trans-unit id="option_flexibleTextareas_MaxHeight.description" resname="option_flexibleTextareas_MaxHeight.description">
<source>Define the maximal height of flexible textareas (in Pixel).</source>
</trans-unit>
<trans-unit id="option_resizeTextareas_Flexible.alttitle" resname="option_resizeTextareas_Flexible.alttitle">
<source>Make Textareas Flexible</source>
</trans-unit>
<trans-unit id="option_resizeTextareas_Flexible.description" resname="option_resizeTextareas_Flexible.description">
<source>This option will make textareas flexible. The height will grow automatically while typing. Limit is the maximal height set (default 600).</source>
<source>Define the maximum height of text areas in pixels.</source>
</trans-unit>
<trans-unit id="option_showHiddenFilesAndFolders.description" resname="option_showHiddenFilesAndFolders.description">
<source>Defines whether you want to list all the hidden files and folders (beginning with a .) in the filelist and element browser.</source>
......
......@@ -115,11 +115,6 @@ $GLOBALS['TYPO3_USER_SETTINGS'] = [
'eventName' => 'setup:confirmation:response',
]
],
'resizeTextareas_Flexible' => [
'type' => 'check',
'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resizeTextareas_Flexible',
'csh' => 'resizeTextareas_Flexible'
],
'resizeTextareas_MaxHeight' => [
'type' => 'number',
'class' => 'form-control-adapt',
......@@ -130,5 +125,5 @@ $GLOBALS['TYPO3_USER_SETTINGS'] = [
'showitem' => '--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:personal_data,realName,email,emailMeAtLogin,avatar,lang,
--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:passwordHeader,passwordCurrent,password,password2,
--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:opening,startModule,
--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,resizeTextareas_Flexible,resizeTextareas_MaxHeight,titleLen,edit_docModuleUpload,showHiddenFilesAndFolders,copyLevels,resetConfiguration'
--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,resizeTextareas_MaxHeight,titleLen,edit_docModuleUpload,showHiddenFilesAndFolders,copyLevels,resetConfiguration'
];
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