diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 9b22483f5c..425bcbf6b7 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -227,7 +227,7 @@ if (is_ajax()) { 'field'.$i.'_value', 'text/plain', '', - $content_type == 'text/plain', + '', $is_management_allowed, '', '', @@ -239,7 +239,7 @@ if (is_ajax()) { 'field'.$i.'_value', 'text/html', '', - $content_type == 'text/html', + 'text/html', $is_management_allowed, '', '', diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index de5d93a082..0ef5392798 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -712,7 +712,6 @@ $(document).ready (function () { old_recovery_value = $("[name=field" + i + "_recovery_value]").val(); } - // Replace the old column with the new $table_macros_field.replaceWith(field_row); if (old_value != '' || old_recovery_value != '') { @@ -720,12 +719,14 @@ $(document).ready (function () { if (inputType == 'radio') { if(old_value == 'text/plain'){ if ($("[name=field" + i + "_value]").val() == 'text/plain') { - $("[name=field" + i + "_value]").attr('checked','checked'); + $("[name=field" + i + "_value][value='text/plain']").attr('checked','checked'); + $("[name=field" + i + "_value][value='text/html']").removeAttr("checked") } } else{ - if($("[name=field" + i + "_value]").val() == 'text/html') { - $("[name=field" + i + "_value]").attr('checked','checked'); + $("[name=field" + i + "_value]").val() + if ($("[name=field" + i + "_value]").val() == 'text/html') { + $("[name=field" + i + "_value][value='text/html']").attr('checked','checked'); } } if(old_recovery_value == 'text/plain'){