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 <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$(document).ready(function(){
-$(".goback").on("click",function(){
+$(".goback").on("click",function(e){
+ e.preventDefault();
window.history.back();
});
[% ELSE %]
[% END %]
<div id="onerror_actions">
- <a class="button goback">Return to previous page</a>
+ <a href="#" class="button goback">Return to previous page</a>
</div>
[% END %]
</div>