From 6e6f9c973d41797abf08382a6d7ad819a27d2ec8 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 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 Signed-off-by: Kyle M Hall --- .../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 a139f61b2e..bbc539b99a 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: