Skip to content

Commit

Permalink
fix(glpiselectfield): max_tree_depth_not_saved
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Apr 11, 2023
1 parent 0b46dec commit 462ea69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/field/glpiselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function showForm(array $options): void {

$this->question->fields['_tree_root'] = $decodedValues['show_tree_root'] ?? Dropdown::EMPTY_VALUE;
$this->question->fields['_tree_root_selectable'] = $decodedValues['selectable_tree_root'] ?? '0';
$this->question->fields['_tree_max_depth'] = $decodedValues['show_tree_depth'] ?? Dropdown::EMPTY_VALUE;
$this->question->fields['_tree_max_depth'] = $decodedValues['show_tree_depth'] ?? '0';
$this->question->fields['_entity_restrict'] = $decodedValues['entity_restrict'] ?? self::ENTITY_RESTRICT_FORM;
$this->question->fields['_is_tree'] = '0';
$this->question->fields['_is_entity_restrict'] = '0';
Expand Down
2 changes: 1 addition & 1 deletion templates/field/glpiselectfield.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

{{ fields.numberField(
'show_tree_depth',
item.fields['_show_tree_depth'],
item.fields['_tree_max_depth'],
__('Limit subtree depth', 'formcreator'), {
label_class: 'col-xxl-4',
input_class: 'col-xxl-8',
Expand Down

0 comments on commit 462ea69

Please sign in to comment.