From 74b4e7ad82b0332a4bedfebb194756b4472a7499 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 15 Mar 2021 01:50:26 +0100 Subject: [PATCH] Replace button JS redirect by an href on an error message Signed-off-by: William Desportes --- js/src/error_report.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/js/src/error_report.js b/js/src/error_report.js index 0e21d34a33..87e08fc491 100644 --- a/js/src/error_report.js +++ b/js/src/error_report.js @@ -132,7 +132,8 @@ var ErrorReport = { buttonHtml += Messages.strShowReportDetails; buttonHtml += ''; - buttonHtml += ''; + var settingsUrl = 'index.php?route=/preferences/features&server=' + CommonParams.get('server'); + buttonHtml += ''; buttonHtml += Functions.getImage('s_cog', Messages.strChangeReportSettings); buttonHtml += ''; @@ -145,7 +146,6 @@ var ErrorReport = { $div.append($buttons); $div.appendTo(document.body); $(document).on('click', '#show_error_report_' + key, ErrorReport.createReportDialog); - $(document).on('click', '#change_error_settings', ErrorReport.redirectToSettings); $(document).on('click', '#ignore_error', ErrorReport.removeErrorNotification); }, /** @@ -191,15 +191,6 @@ var ErrorReport = { ErrorReport.removeErrorNotification(); ErrorReport.showReportDialog(ErrorReport.lastException); }, - /** - * Redirects to the settings page containing error report - * preferences - * - * @return {void} - */ - redirectToSettings: function () { - window.location.href = 'index.php?route=/preferences/features'; - }, /** * Returns the report data to send to the server *