Fixed bug in list graphs view

This commit is contained in:
Manuel Montes 2019-09-09 21:02:53 +02:00
parent 5526bb49ed
commit 90c94e74d9
1 changed files with 10 additions and 9 deletions

View File

@ -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] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text($graph['name'], 70).'</a>';
$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')]).'</a>';
}
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);
}