From 4e5ed459d6ba95a08c9306828024a27fd5bed7d3 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Mon, 3 Feb 2020 10:55:47 +0100 Subject: [PATCH] fix(textareafield): have file uploads work without file drop area Signed-off-by: Thierry Bugier --- inc/fields/textareafield.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/fields/textareafield.class.php b/inc/fields/textareafield.class.php index 2acdd74cf..e9977039d 100644 --- a/inc/fields/textareafield.class.php +++ b/inc/fields/textareafield.class.php @@ -85,11 +85,12 @@ public function displayField($canEdit = true) { 'rows' => 5, 'display' => false, 'enable_richtext' => $useRichText, - 'enable_fileupload' => true, + 'enable_fileupload' => false, ]); - if (version_compare(GLPI_VERSION, '9.4.6') < 0) { - echo ''; - } + // This area is filled by glpi : @see js/fileupload.js + // it contains _filename[] hidden inputs required to properly handle + // images pasted in the textarea + echo '
'; echo Html::scriptBlock("$(function() { pluginFormcreatorInitializeTextarea('$fieldName', '$rand'); });");