diff --git a/inc/fields/textareafield.class.php b/inc/fields/textareafield.class.php index f5623428c..7dc3e4013 100644 --- a/inc/fields/textareafield.class.php +++ b/inc/fields/textareafield.class.php @@ -95,6 +95,10 @@ public function displayField($canEdit = true) { 'enable_fileupload' => false, 'uploads' => $this->uploads ]); + if (PLUGIN_FORMCREATOR_TEXTAREA_FIX && version_compare(GLPI_VERSION, '9.5.0-dev') < 0) { + // for GLPI 9.4 without patch https://github.com/glpi-project/glpi/pull/6936 + echo '
'; + } echo Html::scriptBlock("$(function() { pluginFormcreatorInitializeTextarea('$fieldName', '$rand'); });"); diff --git a/setup.php b/setup.php index 2e03b35ac..0ff164970 100644 --- a/setup.php +++ b/setup.php @@ -42,6 +42,8 @@ // Maximum GLPI version, exclusive define ('PLUGIN_FORMCREATOR_GLPI_MAX_VERSION', '9.5'); +define ('PLUGIN_FORMCREATOR_TEXTAREA_FIX', true); + define('FORMCREATOR_ROOTDOC', $CFG_GLPI['root_doc'] . '/plugins/formcreator'); /**