Skip to content

Commit

Permalink
fix(textarea): workaround GLPI bug in 9.4.5
Browse files Browse the repository at this point in the history
see glpi-project/glpi#6811

close #1613

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 14, 2020
1 parent 3a191eb commit 8de4358
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions inc/fields/textareafield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,17 @@ public function displayField($canEdit = true) {
$value = $this->value;
}
echo Html::textarea([
'name' => $fieldName,
'rand' => $rand,
'value' => $value,
'rows' => 5,
'display' => false,
'enable_richtext' => $useRichText,
'enable_fileupload'=> true,
'name' => $fieldName,
'rand' => $rand,
'value' => $value,
'rows' => 5,
'display' => false,
'enable_richtext' => $useRichText,
'enable_fileupload' => true,
]);
if (version_compare(GLPI_VERSION, '9.4.6') < 0) {
echo '</div>';
}
echo Html::scriptBlock("$(function() {
pluginFormcreatorInitializeTextarea('$fieldName', '$rand');
});");
Expand Down

0 comments on commit 8de4358

Please sign in to comment.