#10899 entities inventory and correction visual style

This commit is contained in:
Jonathan 2023-04-12 10:25:35 +02:00
parent 310496f135
commit aa9fefd30c
2 changed files with 12 additions and 6 deletions

View File

@ -75,7 +75,7 @@ if ($add_inventory_module) {
'interval' => $interval, 'interval' => $interval,
'username' => $username, 'username' => $username,
'password' => $password, 'password' => $password,
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '', 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields))) : '',
]; ];
$result = db_process_sql_insert('tagent_module_inventory', $values); $result = db_process_sql_insert('tagent_module_inventory', $values);
@ -119,7 +119,7 @@ if ($add_inventory_module) {
'interval' => $interval, 'interval' => $interval,
'username' => $username, 'username' => $username,
'password' => $password, 'password' => $password,
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '', 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields))) : '',
]; ];
$result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]); $result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]);

View File

@ -7559,7 +7559,7 @@ function ui_get_inventory_module_add_form(
'border' => '0', 'border' => '0',
'title' => __('Remove'), 'title' => __('Remove'),
'style' => 'cursor: pointer;', 'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter', 'class' => 'remove-custom-field invert_filter main_menu_icon',
] ]
); );
@ -7593,9 +7593,13 @@ function ui_get_inventory_module_add_form(
'custom_fields['.$i.'][value]', 'custom_fields['.$i.'][value]',
$field['value'], $field['value'],
'', '',
25, false,
40, 40,
true true,
false,
false,
'',
'w90p'
); );
} }
@ -7607,7 +7611,7 @@ function ui_get_inventory_module_add_form(
'border' => '0', 'border' => '0',
'title' => __('Remove'), 'title' => __('Remove'),
'style' => 'cursor: pointer;', 'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter', 'class' => 'remove-custom-field invert_filter main_menu_icon',
] ]
); );
@ -7670,10 +7674,12 @@ function ui_get_inventory_module_add_form(
$("#inventory-module-form-userpass-row").hide(); $("#inventory-module-form-userpass-row").hide();
$("#inventory-module-form-custom-fields-row").show(); $("#inventory-module-form-custom-fields-row").show();
$("tr[id^=inventory-module-form-custom-field-row-]").show(); $("tr[id^=inventory-module-form-custom-field-row-]").show();
$('#inventory-module-form-custom-fields-button').show();
} else { } else {
$("#inventory-module-form-userpass-row").show(); $("#inventory-module-form-userpass-row").show();
$("#inventory-module-form-custom-fields-row").hide(); $("#inventory-module-form-custom-fields-row").hide();
$("tr[id^=inventory-module-form-custom-field-row-]").hide(); $("tr[id^=inventory-module-form-custom-field-row-]").hide();
$('#inventory-module-form-custom-fields-button').hide();
} }
} }