From 10861b1a57f980221d44db9a2bb3e6b654671722 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Apr 2016 09:31:10 -0400 Subject: [PATCH] [PASSED QA] Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module 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. Signed-off-by: Hector Castro Works as advertised Signed-off-by: Katrin Fischer --- .../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: