Solved nonexistent help message in the field 1, alerts section. Ticket #2799

This commit is contained in:
Arturo Gonzalez Diaz 2015-09-23 09:11:01 +02:00
parent 5c42206f1e
commit 72c5a47fcc
2 changed files with 9 additions and 6 deletions

View File

@ -88,6 +88,10 @@ if (is_ajax ()) {
$fdesc = $field_description .
' <br><span style="font-size:xx-small; font-weight:normal;">' . sprintf(__('Field %s'), $i) . '</span>';
}
//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);

View File

@ -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();
}