Aditional control for agent autocomplete input icon'

This commit is contained in:
José González 2021-05-07 11:53:42 +02:00
parent 856186ee59
commit 5b709e6331
1 changed files with 6 additions and 0 deletions

View File

@ -3326,6 +3326,9 @@ function print_SLA_list($width, $action, $idItem=null)
<input id="hidden-id_agent_sla" name="id_agent_sla" value="" type="hidden">
<input id="hidden-id_server" name="id_server" value="" type="hidden">
<?php
// Set autocomplete image.
$autocompleteImage = html_print_image(($config['style'] === 'pandora_black') ? 'images/agent_mc.menu.png' : 'images/search_agent.png', true, false, true);
// Params for agent autocomplete input.
$params = [];
$params['show_helptip'] = true;
$params['input_name'] = 'agent_sla';
@ -3335,6 +3338,7 @@ function print_SLA_list($width, $action, $idItem=null)
$params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'id_agent_module_sla';
$params['add_none_module'] = false;
$params['icon_image'] = $autocompleteImage;
if ($meta) {
$params['use_input_id_server'] = true;
$params['input_id_server_id'] = 'hidden-id_server';
@ -3370,6 +3374,7 @@ function print_SLA_list($width, $action, $idItem=null)
$params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'id_agent_module_failover';
$params['add_none_module'] = false;
$params['icon_image'] = $autocompleteImage;
if ($meta) {
$params['use_input_id_server'] = true;
$params['input_id_server_id'] = 'hidden-id_server';
@ -4892,6 +4897,7 @@ function addSLARow() {
$("input[name=id_agent_failover]").val('');
$("input[name=id_server]").val('');
$("input[name=agent_sla]").val('');
$("input[name=agent_sla]").css("background","url('<?php echo $autocompleteImage; ?>') right center no-repeat")
$("input[name=agent_failover]").val('');
$("#id_agent_module_sla").empty();
$("#id_agent_module_sla").attr('disabled', 'true');