From c5a354ebb6a0d2081b01d2e92c00dd715a9191e8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Apr 2016 09:31:10 -0400 Subject: [PATCH] Bug 16281 [Follow-up] Remove the use of "onclick" from Reports module Content-Type: text/plain; charset="utf-8" This minor follow-up adds a dummy href attribute to the "Return to the previous page" link so that the link behaves like a link. A "preventDefault()" is added to the goback() function to keep the "#" link from triggering a page jump. To test, apply the patch, create a report with an SQL error and run it. Confirm that the 'Return to previous page' link works as expected. --- .../intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 0ff2e8b..37f05ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -68,7 +68,8 @@ function load_group_subgroups () { $(document).ready(function(){ -$(".goback").on("click",function(){ +$(".goback").on("click",function(e){ + e.preventDefault(); window.history.back(); }); @@ -1017,7 +1018,7 @@ Sub report: