File tree Expand file tree Collapse file tree 1 file changed +16
-19
lines changed
Expand file tree Collapse file tree 1 file changed +16
-19
lines changed Original file line number Diff line number Diff line change 4444 $ suffix = '] ' ;
4545 }
4646
47- switch ($ _POST ['type ' ]) {
48- case 'Group ' :
49- case 'Profile ' :
50- $ params = ['value ' => $ _SESSION ['glpiactive_entity ' ],
51- 'name ' => $ prefix . 'entities_id ' . $ suffix ,
52- ];
53- if (Session::canViewAllEntities ()) {
54- $ params ['toadd ' ] = [-1 => __ ('No restriction ' )];
55- }
56- echo "<table class='tab_format'><tr><td> " ;
57- echo htmlescape (Entity::getTypeName (1 ));
58- echo "</td><td> " ;
59- Entity::dropdown ($ params );
60- echo "</td><td> " ;
61- echo __s ('Child entities ' );
62- echo "</td><td> " ;
63- Dropdown::showYesNo ($ prefix . 'is_recursive ' . $ suffix );
64- echo "</td></tr></table> " ;
65- break ;
47+ if ($ _POST ['type ' ] === Profile::class) {
48+ $ params = ['value ' => $ _SESSION ['glpiactive_entity ' ],
49+ 'name ' => $ prefix . 'entities_id ' . $ suffix ,
50+ ];
51+ if (Session::canViewAllEntities ()) {
52+ $ params ['toadd ' ] = [-1 => __ ('No restriction ' )];
53+ }
54+ echo "<table class='tab_format'><tr><td> " ;
55+ echo htmlescape (Entity::getTypeName (1 ));
56+ echo "</td><td> " ;
57+ Entity::dropdown ($ params );
58+ echo "</td><td> " ;
59+ echo __s ('Child entities ' );
60+ echo "</td><td> " ;
61+ Dropdown::showYesNo ($ prefix . 'is_recursive ' . $ suffix );
62+ echo "</td></tr></table> " ;
6663 }
6764}
You can’t perform that action at this time.
0 commit comments