fixes in reports front page default setup

This commit is contained in:
alejandro-campos 2020-05-28 14:47:36 +02:00
parent b595548eee
commit 476ebe70a7
1 changed files with 19 additions and 8 deletions

View File

@ -1093,7 +1093,7 @@ $row++;
}
}
// Logo
// 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."),
true
@ -1107,7 +1107,7 @@ $row++;
'',
true
);
// Preview
// Preview.
$table_report->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview';
if (empty($config['custom_report_front_logo'])) {
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
@ -1115,23 +1115,32 @@ $row++;
$table_report->data['custom_report_front-preview'][1] = '<span id="preview_image">'.html_print_image($config['custom_report_front_logo'], true).'</span>';
// Header
// Header.
$table_report->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header');
// Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection.
$table_report->data['custom_report_front-header'][1] = html_print_textarea(
'custom_report_front_header',
5,
15,
$config['custom_report_front_header'],
io_safe_output($config['custom_report_front_header']),
'style="width: 38em;"',
true
);
// First page
// First page.
// Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection.
if ($config['custom_report_front']) {
$firstpage_content = $config['custom_report_front_firstpage'];
} else {
$firstpage_content = io_safe_output($config['custom_report_front_firstpage']);
}
$table_report->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page');
$custom_report_front_firstpage = str_replace(
'(_URLIMAGE_)',
ui_get_full_url(false, true, false, false),
$config['custom_report_front_firstpage']
io_safe_output($firstpage_content)
);
$table_report->data['custom_report_front-first_page'][1] = html_print_textarea(
'custom_report_front_firstpage',
@ -1142,13 +1151,15 @@ $row++;
true
);
// Footer
// Footer.
$table_report->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer');
// Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection.
$table_report->data['custom_report_front-footer'][1] = html_print_textarea(
'custom_report_front_footer',
5,
15,
$config['custom_report_front_footer'],
io_safe_output($config['custom_report_front_footer']),
'style="width: 38em;"',
true
);