10489-Fix alerts edition and event response

This commit is contained in:
Pablo Aragon 2023-02-21 13:18:44 +01:00
parent 57a6bf97b0
commit 80818d7b6e
3 changed files with 24 additions and 13 deletions

View File

@ -938,7 +938,7 @@ if ($step == 2) {
false,
(!$is_management_allowed | $disabled),
"removeTinyMCE('textarea_field".$i."')",
'',
'style="height: 15px !important;"',
true
);
// Advanced.
@ -951,7 +951,7 @@ if ($step == 2) {
true,
(!$is_management_allowed | $disabled),
"addTinyMCE('textarea_field".$i."')",
'',
'style="height: 15px !important;"',
true
);
$table->data['field'.$i][1] .= '</small></b></div>';
@ -962,7 +962,7 @@ if ($step == 2) {
1,
1,
isset($fields[$i]) ? $fields[$i] : '',
'class="fields" min-height-40px',
'class="fields w100p" style="min-height: 100px !important;"',
true,
'',
(!$is_management_allowed | $disabled)
@ -979,7 +979,7 @@ if ($step == 2) {
false,
(!$is_management_allowed | $disabled),
"removeTinyMCE('textarea_field".$i."_recovery')",
'',
'style="height: 15px !important;"',
true
);
// Advanced.
@ -992,7 +992,7 @@ if ($step == 2) {
true,
(!$is_management_allowed | $disabled),
"addTinyMCE('textarea_field".$i."_recovery')",
'',
'style="height: 15px !important;"',
true
);
$table->data['field'.$i][2] .= '</small></b></div>';
@ -1003,7 +1003,7 @@ if ($step == 2) {
1,
1,
isset($fields_recovery[$i]) ? $fields_recovery[$i] : '',
'class="fields min-height-40px"',
'class="fields w100p" style="min-height: 100px !important;"',
true,
'',
(!$is_management_allowed | $disabled)
@ -1167,32 +1167,37 @@ if ($id) {
if (!$disabled) {
if ($is_management_allowed === true) {
if ($step >= LAST_STEP) {
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Finish'),
'finish',
false,
'class="sub upd"'
'class="submitButton"',
true
);
} else {
html_print_input_hidden('step', ($step + 1));
if ($step == 2) {
// Javascript onsubmit to avoid min = 0 and max = 0.
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Next'),
'next',
false,
'class="sub next" onclick="return check_fields_step2();"'
'class="submitButton" onclick="return check_fields_step2();"',
true
);
} else {
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Next'),
'next',
false,
'class="sub next"'
'class="submitButton"',
true
);
}
}
}
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
}
echo '</div>';

View File

@ -84,6 +84,7 @@ if ($event_response_id > 0) {
$table = new stdClass();
$table->styleTable = 'margin: 10px 10px 0';
$table->class = 'databox filters';
$table->colspan[4][1] = 3;
if (is_metaconsole()) {
$table->head[0] = __('Edit event responses');
@ -183,7 +184,7 @@ $data[1] = html_print_textarea(
3,
1,
$event_response['target'],
'class="mh_initial"',
'class="mh_initial w100p"',
true
);

View File

@ -483,3 +483,8 @@ div.multi-response-buttons {
flex-direction: row-reverse;
justify-content: flex-start;
}
td:has(div#server_to_exec_label),
td:has(div#server_to_exec_value) {
padding: 0px;
}