Skip to content

Commit 258ad70

Browse files
committed
fix(textareafield): handle with constant the availability of #6939 for GLPI
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 0a163d5 commit 258ad70

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

inc/fields/textareafield.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ public function displayField($canEdit = true) {
9595
'enable_fileupload' => false,
9696
'uploads' => $this->uploads
9797
]);
98+
if (PLUGIN_FORMCREATOR_TEXTAREA_FIX && version_compare(GLPI_VERSION, '9.5.0-dev') < 0) {
99+
// for GLPI 9.4 without patch https://github.com/glpi-project/glpi/pull/6936
100+
echo '<div class="fileupload_info"></div>';
101+
}
98102
echo Html::scriptBlock("$(function() {
99103
pluginFormcreatorInitializeTextarea('$fieldName', '$rand');
100104
});");

setup.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
// Maximum GLPI version, exclusive
4343
define ('PLUGIN_FORMCREATOR_GLPI_MAX_VERSION', '9.5');
4444

45+
define ('PLUGIN_FORMCREATOR_TEXTAREA_FIX', true);
46+
4547
define('FORMCREATOR_ROOTDOC', $CFG_GLPI['root_doc'] . '/plugins/formcreator');
4648

4749
/**

0 commit comments

Comments
 (0)