Skip to content

Commit

Permalink
fix(textareafield): have file uploads work without file drop area
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Feb 5, 2020
1 parent 559424e commit 4e5ed45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions inc/fields/textareafield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '</div>';
}
// 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 '<div id="fileupload_info" class="fileupload_info"></div>';
echo Html::scriptBlock("$(function() {
pluginFormcreatorInitializeTextarea('$fieldName', '$rand');
});");
Expand Down

0 comments on commit 4e5ed45

Please sign in to comment.