Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ajax/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,19 @@

$display_condition = new PluginFieldsContainerDisplayCondition();
if ($display_condition->computeDisplayContainer($item, $containers_id)) {
$field_options = [
'label_class' => 'col-lg-3',
'input_class' => 'col-lg-9',
];
echo "<div class='offset-md-1 col-md-8 col-xxl-6'>";
PluginFieldsField::showDomContainer(
$containers_id,
$item,
$type,
$subtype,
$field_options,
);
echo "</div>";
} else {
echo '';
}
Expand Down
10 changes: 8 additions & 2 deletions inc/field.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,12 @@ public static function showForTab($params)
{
$item = $params['item'];

if ($item->fields['type'] == "") {
$item->fields['type'] = $params['options']['type'];
}
if ($item->fields['itilcategories_id'] == "") {
$item->fields['itilcategories_id'] = $params['options']['itilcategories_id'];
}
$functions = array_column(debug_backtrace(), 'function');
$subtype = isset($_SESSION['glpi_tabs'][strtolower($item::getType())]) ? $_SESSION['glpi_tabs'][strtolower($item::getType())] : '';
$type = substr($subtype, -strlen('$main')) === '$main'
Expand Down Expand Up @@ -956,7 +962,7 @@ public static function showForTab($params)
}

$html_id = 'plugin_fields_container_' . mt_rand();
if (strpos($current_url, 'helpdesk.public.php') !== false) {
if (strpos($current_url, 'helpdesk.public.php') !== false || strpos($current_url, 'tracking.injector.php') !== false) {
echo "<div id='{$html_id}' class='card-body row mx-0' style='border-top:0'>";
echo "<div class='offset-md-1 col-md-8 col-xxl-6'>";
$field_options = [
Expand All @@ -976,7 +982,7 @@ public static function showForTab($params)
$field_options ?? [],
);
}
if (strpos($current_url, 'helpdesk.public.php') !== false) {
if (strpos($current_url, 'helpdesk.public.php') !== false || strpos($current_url, 'tracking.injector.php') !== false) {
echo '</div>';
}
echo '</div>';
Expand Down
Loading