Skip to content

Commit 86893f4

Browse files
committed
fix(ui): tinymce may ot load
1 parent 236effd commit 86893f4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

inc/targetticket.class.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ protected function getCategoryFilter() {
4747
public function showForm($options=[]) {
4848
global $CFG_GLPI, $DB;
4949

50-
if ($CFG_GLPI['use_rich_text']) {
51-
Html::requireJs('tinymce');
52-
}
5350
$rand = mt_rand();
5451

5552
$obj = new PluginFormcreatorTarget();

setup.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ function plugin_init_formcreator() {
165165
$PLUGIN_HOOKS['add_javascript']['formcreator'][] = 'js/scripts.js.php';
166166
}
167167

168+
if (strpos($_SERVER['REQUEST_URI'], "plugins/formcreator/front/targetticket.form.php") !== false) {
169+
if ($CFG_GLPI['use_rich_text']) {
170+
Html::requireJs('tinymce');
171+
}
172+
}
173+
168174
if (strpos($_SERVER['REQUEST_URI'], "helpdesk") !== false
169175
|| strpos($_SERVER['REQUEST_URI'], "central.php") !== false
170176
|| strpos($_SERVER['REQUEST_URI'], "formcreator/front/formlist.php") !== false

0 commit comments

Comments
 (0)