Skip to content

Commit 462ea69

Browse files
committed
fix(glpiselectfield): max_tree_depth_not_saved
1 parent 0b46dec commit 462ea69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

inc/field/glpiselectfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function showForm(array $options): void {
5353

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

templates/field/glpiselectfield.html.twig

+1-1
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)