From 90c94e74d9809c354065c6166ec324266c270343 Mon Sep 17 00:00:00 2001 From: Manuel Montes Date: Mon, 9 Sep 2019 21:02:53 +0200 Subject: [PATCH] Fixed bug in list graphs view --- pandora_console/godmode/reporting/graphs.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index cb52af5e04..fd8d3cff84 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -257,11 +257,6 @@ $table_aux = new stdClass(); $table->cellspacing = 0; $table->align = []; $table->head = []; - if ($report_w || $report_m) { - $table->align[5] = 'left'; - $table->head[5] = html_print_checkbox('all_delete', 0, false, true, false); - $table->size[5] = '20px'; - } $table->head[0] = __('Graph name'); $table->head[1] = __('Description'); @@ -280,6 +275,12 @@ $table_aux = new stdClass(); $table->size[4] = '90px'; } + if ($report_w || $report_m) { + $table->align[5] = 'left'; + $table->head[5] = html_print_checkbox('all_delete', 0, false, true, false); + $table->size[5] = '20px'; + } + $table->data = []; $result_graphs = array_slice($graphs, $offset, $config['block_size']); @@ -287,10 +288,6 @@ $table_aux = new stdClass(); foreach ($result_graphs as $graph) { $data = []; - if ($report_m) { - $data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true); - } - $data[0] = ''.ui_print_truncate_text($graph['name'], 70).''; $data[1] = ui_print_truncate_text($graph['description'], 70); @@ -309,6 +306,10 @@ $table_aux = new stdClass(); return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).''; } + if ($report_m) { + $data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true); + } + array_push($table->data, $data); }