From db49db371116bcc4bf6b2c88045062c816d1e000 Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 13 Jan 2020 18:21:48 +0100 Subject: [PATCH] report font not depending of custom report front enabled --- .../godmode/reporting/reporting_builder.php | 4 +-- .../godmode/setup/setup_visuals.php | 28 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index e5e7121b10..4ff734bef9 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1207,8 +1207,7 @@ switch ($action) { $report_id_user = get_parameter('report_id_user'); $non_interactive = get_parameter('non_interactive', 0); - // Pretty font by default for pdf. - $custom_font = 'FreeSans.ttf'; + $custom_font = $config['custom_report_front_font']; switch ($type_access_selected) { case 'group_view': @@ -1284,7 +1283,6 @@ switch ($action) { $metaconsole_report = (int) is_metaconsole(); if ($config['custom_report_front']) { - $custom_font = $config['custom_report_front_font']; $logo = $config['custom_report_front_logo']; $header = $config['custom_report_front_header']; $first_page = $config['custom_report_front_firstpage']; diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 60da29ea46..32268e7c1a 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1048,6 +1048,20 @@ $row++; $row++; + $table_report->data[$row][0] = __('PDF font family'); + $table_report->data[$row][1] = html_print_select( + $fonts, + 'custom_report_front_font', + $config['custom_report_front_font'], + false, + __('Default'), + '', + true + ); + + $row++; + + $table_report->data[$row][0] = __('Graph image height for HTML reports'); $table_report->data[$row][0] .= ui_print_help_tip( __('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'), @@ -1078,18 +1092,6 @@ $row++; } } - // Font - $table_report->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family'); - $table_report->data['custom_report_front-font'][1] = html_print_select( - $fonts, - 'custom_report_front_font', - $config['custom_report_front_font'], - false, - __('Default'), - '', - true - ); - // Logo $table_report->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip( __("The dir of custom logos is in your www Console in 'images/custom_logo'. You can upload more files (ONLY JPEG AND PNG) in upload tool in console."), @@ -1397,7 +1399,6 @@ function edit_csv_divider () { function display_custom_report_front (show,table) { if (show == true) { - $('tr#'+table+'-custom_report_front-font').show(); $('tr#'+table+'-custom_report_front-logo').show(); $('tr#'+table+'-custom_report_front-preview').show(); $('tr#'+table+'-custom_report_front-header').show(); @@ -1405,7 +1406,6 @@ function display_custom_report_front (show,table) { $('tr#'+table+'-custom_report_front-footer').show(); } else { - $('tr#'+table+'-custom_report_front-font').hide(); $('tr#'+table+'-custom_report_front-logo').hide(); $('tr#'+table+'-custom_report_front-preview').hide(); $('tr#'+table+'-custom_report_front-header').hide();