File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 54
54
use Ticket_User ;
55
55
use Search ;
56
56
use SLA ;
57
+ use SLM ;
57
58
use OLA ;
58
59
use QuerySubQuery ;
59
60
use QueryUnion ;
@@ -89,6 +90,7 @@ public function showForm(array $options): void {
89
90
$ this ->question ->fields ['_tree_root_selectable ' ] = $ decodedValues ['selectable_tree_root ' ] ?? '0 ' ;
90
91
$ this ->question ->fields ['_tree_max_depth ' ] = $ decodedValues ['show_tree_depth ' ] ?? Dropdown::EMPTY_VALUE ;
91
92
$ this ->question ->fields ['_show_ticket_categories ' ] = isset ($ decodedValues ['show_ticket_categories ' ]) ? $ decodedValues ['show_ticket_categories ' ] : 'both ' ;
93
+ $ this ->question ->fields ['_show_service_level_types ' ] = isset ($ decodedValues ['show_service_level_types ' ]) ? $ decodedValues ['show_service_level_types ' ] : SLM ::TTO ;
92
94
$ this ->question ->fields ['_entity_restrict ' ] = $ decodedValues ['entity_restrict ' ] ?? self ::ENTITY_RESTRICT_FORM ;
93
95
$ this ->question ->fields ['_is_tree ' ] = '0 ' ;
94
96
$ this ->question ->fields ['_is_entity_restrict ' ] = '0 ' ;
@@ -514,8 +516,8 @@ public function prepareQuestionInputForSave($input) {
514
516
} else if ($ input ['itemtype ' ] == SLA ::getType ()
515
517
|| $ input ['itemtype ' ] == OLA ::getType ()
516
518
) {
517
- $ input ['values ' ]['show_service_level_types ' ] = $ input ['show_service_level_types ' ];
518
- unset($ input ['show_service_level_types ' ]);
519
+ $ input ['values ' ]['show_service_level_types ' ] = $ input ['_show_service_level_types ' ];
520
+ unset($ input ['_show_service_level_types ' ]);
519
521
}
520
522
521
523
// Params for entity restrictables itemtypes
Original file line number Diff line number Diff line change 99
99
}) }}
100
100
{% endif %}
101
101
102
+ {% if item .fields ['itemtype' ] is defined and (item .fields ['itemtype' ] == ' SLA' or item .fields ['itemtype' ] == ' OLA' ) %}
103
+ {# keys are SLM:TTR, SLM::TTO #}
104
+ {{ fields.dropdownArrayField (
105
+ ' _show_service_level_types' ,
106
+ item .fields ['_show_service_level_types' ],
107
+ {
108
+ 0: __(' Time to resolve' , ' formcreator' ),
109
+ 1: __(' Time to own' , ' formcreator' ),
110
+ },
111
+ __(' Type' , ' formcreator' )
112
+ ) }}
113
+
114
+ {{ fields.nullField ({
115
+ label_class : ' col-xxl-4' ,
116
+ input_class : ' col-xxl-8' ,
117
+ }) }}
118
+ {% endif %}
119
+
120
+
102
121
{# _is_tree is set in the showForm method, and helps to find if the itemtype is a tree #}
103
122
{% if item .fields ['_is_tree' ] == ' 1' %}
104
123
You can’t perform that action at this time.
0 commit comments