diff --git a/modules/opencase_reporting/js/opencase-reporting.js b/modules/opencase_reporting/js/opencase-reporting.js index c916e54..6a700df 100644 --- a/modules/opencase_reporting/js/opencase-reporting.js +++ b/modules/opencase_reporting/js/opencase-reporting.js @@ -1,3 +1,5 @@ -jQuery('#opencase_reporting_buttons #download_data').click(function() { - location.href = location.href + "&_format=csv"; +jQuery('body').on('click','#opencase_reporting_buttons #download_data',function(){ + var url = new URL(location.href); + url.searchParams.append('_format', 'csv'); + location.href = url.toString(); }); diff --git a/modules/opencase_reporting/opencase_reporting.links.menu.yml b/modules/opencase_reporting/opencase_reporting.links.menu.yml deleted file mode 100644 index 1680dde..0000000 --- a/modules/opencase_reporting/opencase_reporting.links.menu.yml +++ /dev/null @@ -1,6 +0,0 @@ -opencase_reporting.new_report: - title: 'Custom report' - description: 'Make your own report' - menu_name: opencase_reporting - url: internal:/opencase/reporting/actors?title=Custom+Report - weight: 0