From 05e87ef279e2d895717bde619b06de0e53057195 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Tue, 24 Jan 2012 18:54:55 +0000 Subject: [PATCH] 2012-01-24 Juan Manuel Ramon * operation/incidents/incident.php operation/incidents/incident_detail.php: Modified agent text search due to usability issues. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5420 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/operation/incidents/incident.php | 6 +++--- .../operation/incidents/incident_detail.php | 12 +++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2827a36a9f..8c4f7932bc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-01-24 Juan Manuel Ramon + + * operation/incidents/incident.php + operation/incidents/incident_detail.php: Modified agent text search + due to usability issues. + 2012-01-24 Juan Manuel Ramon * include/functions_graph.php diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 0a45e43a0b..ca30d91f34 100755 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -88,7 +88,7 @@ elseif ($action == "update") { $estado = get_parameter ("estado_form", 0); $grupo = get_parameter ("grupo_form", 1); $usuario = get_parameter ("usuario_form", $config["id_user"]); - $id_agent = get_parameter ("incident_agents"); + $id_agent = get_parameter ("id_agent"); $sql = sprintf ("UPDATE tincidencia SET titulo = '%s', origen = '%s', estado = %d, id_grupo = %d, id_usuario = '%s', prioridad = %d, descripcion = '%s', id_lastupdate = '%s', id_agent = %d WHERE id_incidencia = %d", $titulo, $origen, $estado, $grupo, $usuario, $prioridad, $descripcion, $config["id_user"], $id_agent, $id_inc); @@ -121,11 +121,11 @@ elseif ($action == "insert") { $prioridad = get_parameter ("prioridad_form"); $id_creator = $config['id_user']; $estado = get_parameter ("estado_form"); - $id_agent = get_parameter ("incident_agents"); + $id_agent = get_parameter ("id_agent"); $sql = sprintf ("INSERT INTO tincidencia (inicio, actualizacion, titulo, descripcion, id_usuario, origen, estado, prioridad, id_grupo, id_creator, id_agent) VALUES (NOW(), NOW(), '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d)", $titulo, $descripcion, $config["id_user"], $origen, $estado, $prioridad, $grupo, $config["id_user"], $id_agent); $id_inc = db_process_sql ($sql, "insert_id"); - +html_debug_print($sql); if ($id_inc === false) { echo '

'.__('Error creating incident').'

'; } diff --git a/pandora_console/operation/incidents/incident_detail.php b/pandora_console/operation/incidents/incident_detail.php index 008dad62ec..cad617d6da 100755 --- a/pandora_console/operation/incidents/incident_detail.php +++ b/pandora_console/operation/incidents/incident_detail.php @@ -314,7 +314,11 @@ foreach ($agents_incidents as $agent_incident){ echo ''.__('Agent').''; -html_print_select ($result_agent_incidents, "incident_agents", $id_agent, '', __('None'), 0, false, false, false, 'w135', false); +html_print_input_hidden('id_agent', $id_agent); +html_print_input_text_extended ('agent', agents_get_name ($id_agent), 'text-agent', '', 30, 100, false, '', array('style' => 'background: url(images/lightning.png) no-repeat right;')); +ui_print_help_tip(__("Type at least two characters to search"), false); + +//html_print_select ($result_agent_incidents, "incident_agents", $id_agent, '', __('None'), 0, false, false, false, 'w135', false); echo ''; @@ -460,3 +464,9 @@ if (isset ($id_inc)) { } } ?> + +