@@ -150,6 +150,7 @@ public function buildParams($rand = null) {
150
150
$ dparams ['right ' ] = 'all ' ;
151
151
$ currentEntity = Session::getActiveEntity ();
152
152
$ ancestorEntities = getAncestorsOf (Entity::getTable (), $ currentEntity );
153
+ $ decodedValues ['entity_restrict ' ] = $ decodedValues ['entity_restrict ' ] ?? 2 ;
153
154
switch ($ decodedValues ['entity_restrict ' ]) {
154
155
case self ::ENTITY_RESTRICT_FORM :
155
156
$ form = PluginFormcreatorForm::getByItem ($ this ->getQuestion ());
@@ -184,6 +185,7 @@ public function buildParams($rand = null) {
184
185
if (Session::getCurrentInterface () == 'helpdesk ' ) {
185
186
$ dparams_cond_crit ['is_helpdeskvisible ' ] = 1 ;
186
187
}
188
+ $ decodedValues ['show_ticket_categories ' ] = $ decodedValues ['show_ticket_categories ' ] ?? 'all ' ;
187
189
switch ($ decodedValues ['show_ticket_categories ' ]) {
188
190
case 'request ' :
189
191
$ dparams_cond_crit ['is_request ' ] = 1 ;
@@ -306,6 +308,7 @@ public function buildParams($rand = null) {
306
308
$ itemtype ::getTable (),
307
309
$ decodedValues ['show_tree_root ' ]
308
310
);
311
+ $ decodedValues ['selectable_tree_root ' ] = $ decodedValues ['selectable_tree_root ' ] ?? '1 ' ;
309
312
if (!isset ($ decodedValues ['selectable_tree_root ' ]) || $ decodedValues ['selectable_tree_root ' ] == '0 ' ) {
310
313
unset($ sons [$ decodedValues ['show_tree_root ' ]]);
311
314
}
@@ -372,9 +375,7 @@ public function getRenderedHtml($domain, $canEdit = true): string {
372
375
$ rand = mt_rand ();
373
376
$ fieldName = 'formcreator_field_ ' . $ id ;
374
377
$ dparams = [];
375
- if (!empty ($ this ->question ->fields ['values ' ])) {
376
- $ dparams = $ this ->buildParams ($ rand );
377
- }
378
+ $ dparams = $ this ->buildParams ($ rand );
378
379
$ dparams ['display ' ] = false ;
379
380
$ dparams ['_idor_token ' ] = Session::getNewIDORToken ($ itemtype );
380
381
$ html .= $ itemtype ::dropdown ($ dparams );
0 commit comments