From 9a76f959780728d385b01eefeaa362fd41012c52 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 20 Feb 2015 12:12:18 +0100 Subject: [PATCH] Added workaround for report admin panel and MSIE8 problems This fixes bugid #320, the admin panel did not properly work because MSIE8 handles "button" tags wrong. --- src/admin/reports.php | 14 ++++++++++++++ src/templates/admin/admin_reports.html | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/admin/reports.php b/src/admin/reports.php index cee0b4b..32f74a7 100644 --- a/src/admin/reports.php +++ b/src/admin/reports.php @@ -72,6 +72,20 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY'] } // --- +// --- FIX MSIE8 Button Values +if (isset($_POST['op'])) +{ + if (strpos($_POST['op'], $content['LN_REPORTS_ADDSAVEDREPORTANDRETURN']) !== false ) + $_POST['op'] = "addsavedreport_return"; + else if (strpos($_POST['op'], $content['LN_REPORTS_EDITSAVEDREPORTANDRETURN']) !== false ) + $_POST['op'] = "editsavedreport_return"; + else if (strpos($_POST['op'], $content['LN_REPORTS_ADDSAVEDREPORT']) !== false ) + $_POST['op'] = "addsavedreport"; + else if (strpos($_POST['op'], $content['LN_REPORTS_EDITSAVEDREPORT']) !== false ) + $_POST['op'] = "editsavedreport"; +} +// --- + // --- BEGIN Custom Code $content['OPTIONAL_TITLE'] = ""; diff --git a/src/templates/admin/admin_reports.html b/src/templates/admin/admin_reports.html index c287c34..8e06721 100644 --- a/src/templates/admin/admin_reports.html +++ b/src/templates/admin/admin_reports.html @@ -222,17 +222,17 @@ if (myform.elements['outputTarget'].value == REPORT_TARGET_STDOUT) { hidevisibility('HiddenOutputFormatFile'); - toggleformelement('outputFormat_filename', false); + toggleformelement('HiddenOutputFormatFile', false); } else if (myform.elements['outputTarget'].value == REPORT_TARGET_FILE) { togglevisibility('HiddenOutputFormatFile'); - toggleformelement('outputFormat_filename', true); + toggleformelement('HiddenOutputFormatFile', true); } else if (myform.elements['outputTarget'].value == REPORT_TARGET_EMAIL) { hidevisibility('HiddenOutputFormatFile'); - toggleformelement('outputFormat_filename', false); + toggleformelement('HiddenOutputFormatFile', false); } }