Skip to content

Commit 4534735

Browse files
committed
Merge remote-tracking branch 'origin/support/2.13.0' into support/2.14.0
2 parents e36ff94 + ba97c84 commit 4534735

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

inc/field/glpiselectfield.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function showForm(array $options): void {
5555

5656
$this->question->fields['_tree_root'] = $decodedValues['show_tree_root'] ?? Dropdown::EMPTY_VALUE;
5757
$this->question->fields['_tree_root_selectable'] = $decodedValues['selectable_tree_root'] ?? '0';
58-
$this->question->fields['_tree_max_depth'] = $decodedValues['show_tree_depth'] ?? Dropdown::EMPTY_VALUE;
58+
$this->question->fields['_tree_max_depth'] = $decodedValues['show_tree_depth'] ?? '0';
5959
$this->question->fields['_entity_restrict'] = $decodedValues['entity_restrict'] ?? self::ENTITY_RESTRICT_FORM;
6060
$this->question->fields['_is_tree'] = '0';
6161
$this->question->fields['_is_entity_restrict'] = '0';

js/scripts.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ var plugin_formcreator = new function() {
11511151

11521152
this.newTranslation = function (formLanguageId) {
11531153
glpi_ajax_dialog({
1154+
dialogclass: 'modal-xl',
11541155
url: '../ajax/form_language.php',
11551156
params: {
11561157
action: 'newTranslation',
@@ -1176,6 +1177,11 @@ var plugin_formcreator = new function() {
11761177
}).fail(function () {
11771178
displayAjaxMessageAfterRedirect();
11781179
}).done(function () {
1180+
// Remove unclosed TinyMCE toolbar
1181+
var tinyToolbar = document.querySelector('.tox-tinymce-aux');
1182+
if (tinyToolbar) {
1183+
tinyToolbar.parentNode.removeChild(tinyToolbar);
1184+
}
11791185
that.showTranslationEditor(form);
11801186
});
11811187
};

templates/field/glpiselectfield.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
{{ fields.numberField(
107107
'show_tree_depth',
108-
item.fields['_show_tree_depth'],
108+
item.fields['_tree_max_depth'],
109109
__('Limit subtree depth', 'formcreator'), {
110110
label_class: 'col-xxl-4',
111111
input_class: 'col-xxl-8',

0 commit comments

Comments
 (0)