From 47451ee9fbac42accfffdb7eb53d7741b5f844eb Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 29 Sep 2016 14:30:07 +0200 Subject: [PATCH] ticket: 4069 add actions for defect in templates html #4069 (cherry picked from commit e48e1ddd7e0cfeb1b41d701e7441f98ffe18ed29) --- .../alerts/configure_alert_template.php | 64 ++++++++++++++++--- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 0e5a90fff0..d9ba721624 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -624,11 +624,13 @@ if ($step == 2) { $table->colspan['example'][1] = 4; } else if ($step == 3) { - $table->style[0] = 'font-weight: bold; vertical-align: top'; + $table->style[0] = 'font-weight: bold; vertical-align: middle'; $table->style[1] = 'font-weight: bold; vertical-align: top'; $table->style[2] = 'font-weight: bold; vertical-align: top'; $table->size = array (); - $table->size[0] = '20%'; + $table->size[0] = '10%'; + $table->size[1] = '45%'; + $table->size[2] = '45%'; /* Alert recover */ if (! $recovery_notify) { @@ -665,11 +667,36 @@ else if ($step == 3) { //$table->rowclass['field'.$i] = 'row_field'; - $table->data['field'.$i][0] = sprintf(__('Field %s'), $i) . - ui_print_help_icon ('alert_macros', true); - $table->data['field'.$i][1] = html_print_textarea('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true); + + $table->data['field'.$i][0] = sprintf(__('Field %s'), $i) . ui_print_help_icon ('alert_macros', true); + //TinyMCE + //triggering fields + //basic + $table->data['field'.$i][1] = "
"; + $table->data['field'.$i][1] .= __('Basic') . "  "; + $table->data['field'.$i][1] .= html_print_radio_button_extended ('editor_type_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."')", '', true); + //Advanced + $table->data['field'.$i][1] .= "    "; + $table->data['field'.$i][1] .= __('Advanced') . "  "; + $table->data['field'.$i][1] .= html_print_radio_button_extended ('editor_type_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."')", '', true); + $table->data['field'.$i][1] .= "
"; + + //Texarea + $table->data['field'.$i][1] .= html_print_textarea('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true); + // Recovery - $table->data['field'.$i][2] = html_print_textarea ('field'.$i.'_recovery', 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', 'style="min-height:40px" class="fields"', true); + //basic + $table->data['field'.$i][2] = "
"; + $table->data['field'.$i][2] .= __('Basic') . "  "; + $table->data['field'.$i][2] .= html_print_radio_button_extended ('editor_type_recovery_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."_recovery')", '', true); + //advanced + $table->data['field'.$i][2] .= "    "; + $table->data['field'.$i][2] .= __('Advanced') . "  "; + $table->data['field'.$i][2] .= html_print_radio_button_extended ('editor_type_recovery_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."_recovery')", '', true); + $table->data['field'.$i][2] .= "
"; + + //Texarea + $table->data['field'.$i][2] .= html_print_textarea ('field'.$i.'_recovery', 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', 'style="min-height:40px" class="fields"', true); } } else { @@ -796,6 +823,7 @@ enterprise_hook('close_meta_frame'); ui_require_javascript_file ('pandora_alerts'); ui_include_time_picker(); ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/"); +ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); ?>