From 72c5a47fcc7c8cb22d2e5afff118df22dd8c5033 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Diaz Date: Wed, 23 Sep 2015 09:11:01 +0200 Subject: [PATCH] Solved nonexistent help message in the field 1, alerts section. Ticket #2799 --- pandora_console/godmode/alerts/alert_commands.php | 6 ++++-- pandora_console/godmode/snmpconsole/snmp_alert.php | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index e9402a5ea7..39f2111ae6 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -88,6 +88,10 @@ if (is_ajax ()) { $fdesc = $field_description . '
' . sprintf(__('Field %s'), $i) . ''; } + //If the field is the number one, print the help message + if ($i == 1) { + $fdesc .= ui_print_help_icon ('snmp_alert_field1', true); + } } else { // If the macro hasn't description and doesnt appear in command, set with empty description to dont show it @@ -197,8 +201,6 @@ if (is_ajax ()) { $fields_rows[5] = ''; } - html_debug_print($fields_rows, true); - $command['fields_rows'] = $fields_rows; echo json_encode ($command); diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 7b8dbd848b..5de3928cad 100755 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -1241,9 +1241,10 @@ $(document).ready (function () { // The row provided has a predefined class. We delete it $('#table_macros-field' + i) .removeAttr('class'); - + + //Remove this to put the help message in alert commands, to do it more general // Add help hint only in first field - if (i == 1) { + /*if (i == 1) { var td_content = $('#table_macros-field' + i) .find('td').eq(0); @@ -1253,8 +1254,8 @@ $(document).ready (function () { td_content.html() + $('#help_snmp_alert_hint').html() ); - } - + }*/ + $("[name=field" + i + "_value]").val(old_value); $('#table_macros-field').show(); }