From 2ce399dd0d24798e5172af3482cae90409976a7a Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 30 May 2016 08:58:24 +0200 Subject: [PATCH] Fixed last value checkbox in reports. Ticket#3685 --- .../reporting/reporting_builder.item_editor.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 6f481223e2..1339d965a1 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -599,6 +599,7 @@ $class = 'databox filters'; } else { $report_type = reports_get_report_types(); + if (!empty($report_type) and isset($report_type[$type]['name'])) echo $report_type[$type]['name']; else @@ -672,7 +673,7 @@ $class = 'databox filters'; @@ -2545,8 +2546,10 @@ function chooseType() { $("#row_show_resume").show(); $("#row_show_in_two_columns").show(); + var checked = $("input[name='last_value']").prop("checked"); + $("#row_last_value").show(); - if ($("#hidden-period").val() == 0) { + if (checked) { $("#row_period").hide(); $("input[name='last_value']").prop("checked", true); } @@ -2598,8 +2601,10 @@ function chooseType() { $("#row_show_graph").show(); $("#row_show_in_two_columns").show(); + var checked = $("input[name='last_value']").prop("checked"); + $("#row_last_value").show(); - if ($("#hidden-period").val() == 0) { + if (checked) { $("#row_period").hide(); $("input[name='last_value']").prop("checked", true); }