File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 56
56
57
57
$ display_condition = new PluginFieldsContainerDisplayCondition ();
58
58
if ($ display_condition ->computeDisplayContainer ($ item , $ containers_id )) {
59
+ $ field_options = [
60
+ 'label_class ' => 'col-lg-3 ' ,
61
+ 'input_class ' => 'col-lg-9 ' ,
62
+ ];
63
+ echo "<div class='offset-md-1 col-md-8 col-xxl-6'> " ;
59
64
PluginFieldsField::showDomContainer (
60
65
$ containers_id ,
61
66
$ item ,
62
67
$ type ,
63
68
$ subtype ,
69
+ $ field_options ,
64
70
);
71
+ echo "</div> " ;
65
72
} else {
66
73
echo '' ;
67
74
}
Original file line number Diff line number Diff line change @@ -887,6 +887,12 @@ public static function showForTab($params)
887
887
{
888
888
$ item = $ params ['item ' ];
889
889
890
+ if ($ item ->fields ['type ' ] == "" ) {
891
+ $ item ->fields ['type ' ] = $ params ['options ' ]['type ' ];
892
+ }
893
+ if ($ item ->fields ['itilcategories_id ' ] == "" ) {
894
+ $ item ->fields ['itilcategories_id ' ] = $ params ['options ' ]['itilcategories_id ' ];
895
+ }
890
896
$ functions = array_column (debug_backtrace (), 'function ' );
891
897
$ subtype = isset ($ _SESSION ['glpi_tabs ' ][strtolower ($ item ::getType ())]) ? $ _SESSION ['glpi_tabs ' ][strtolower ($ item ::getType ())] : '' ;
892
898
$ type = substr ($ subtype , -strlen ('$main ' )) === '$main '
@@ -956,7 +962,7 @@ public static function showForTab($params)
956
962
}
957
963
958
964
$ html_id = 'plugin_fields_container_ ' . mt_rand ();
959
- if (strpos ($ current_url , 'helpdesk.public.php ' ) !== false ) {
965
+ if (strpos ($ current_url , 'helpdesk.public.php ' ) !== false || strpos ( $ current_url , ' tracking.injector.php ' ) !== false ) {
960
966
echo "<div id=' {$ html_id }' class='card-body row mx-0' style='border-top:0'> " ;
961
967
echo "<div class='offset-md-1 col-md-8 col-xxl-6'> " ;
962
968
$ field_options = [
@@ -976,7 +982,7 @@ public static function showForTab($params)
976
982
$ field_options ?? [],
977
983
);
978
984
}
979
- if (strpos ($ current_url , 'helpdesk.public.php ' ) !== false ) {
985
+ if (strpos ($ current_url , 'helpdesk.public.php ' ) !== false || strpos ( $ current_url , ' tracking.injector.php ' ) !== false ) {
980
986
echo '</div> ' ;
981
987
}
982
988
echo '</div> ' ;
You can’t perform that action at this time.
0 commit comments