Skip to content

Commit 4e5ed45

Browse files
committed
fix(textareafield): have file uploads work without file drop area
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 559424e commit 4e5ed45

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

inc/fields/textareafield.class.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ public function displayField($canEdit = true) {
8585
'rows' => 5,
8686
'display' => false,
8787
'enable_richtext' => $useRichText,
88-
'enable_fileupload' => true,
88+
'enable_fileupload' => false,
8989
]);
90-
if (version_compare(GLPI_VERSION, '9.4.6') < 0) {
91-
echo '</div>';
92-
}
90+
// This area is filled by glpi : @see js/fileupload.js
91+
// it contains _filename[] hidden inputs required to properly handle
92+
// images pasted in the textarea
93+
echo '<div id="fileupload_info" class="fileupload_info"></div>';
9394
echo Html::scriptBlock("$(function() {
9495
pluginFormcreatorInitializeTextarea('$fieldName', '$rand');
9596
});");

0 commit comments

Comments
 (0)