diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1882baf40b..4d30ddf80f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-03-06 Sergio Martin + + * include/javascript/pandora_alerts.js: Added missed code + in action recovery fields feature + 2014-03-05 Sergio Martin * include/help/en/help_ipam.php: Fix typo diff --git a/pandora_console/include/javascript/pandora_alerts.js b/pandora_console/include/javascript/pandora_alerts.js index 10ffd3a07e..6d6afa3193 100644 --- a/pandora_console/include/javascript/pandora_alerts.js +++ b/pandora_console/include/javascript/pandora_alerts.js @@ -1,13 +1,17 @@ var original_command = ""; -function parse_alert_command (command) { +function parse_alert_command (command, classs) { + classs = 'field'; + if (classs == 'recovery') { + classs = 'field_recovery'; + } var nfield = 1; $('.' + classs).each(function() { // Only render values different from '' if ($(this).val() == '') { return; } - var field = '_field' + nfield+'_'; + var field = '_field' + nfield + '_'; nfield++; var regex = new RegExp(field,"gi"); command = command.replace (regex, $(this).val()); @@ -17,7 +21,7 @@ function parse_alert_command (command) { } function render_command_preview (original_command) { - $("#textarea_command_preview").text (parse_alert_command (original_command)); + $("#textarea_command_preview").text (parse_alert_command (original_command, '')); $("#textarea_command_recovery_preview").text (parse_alert_command (original_command, 'recovery')); }