diff --git a/cara/apps/calculator/static/js/report.js b/cara/apps/calculator/static/js/report.js index 0b5ff244..a08d6f4a 100644 --- a/cara/apps/calculator/static/js/report.js +++ b/cara/apps/calculator/static/js/report.js @@ -863,6 +863,15 @@ function copy_clipboard(shareable_link) { } function display_rename_column(bool, id) { + // Handle the disable property of the download button + let download_button = document.getElementById('downloadCSV'); + if (document.querySelectorAll('input[type="checkbox"]:checked').length == 0) { + download_button.disabled = true; + } + else { + download_button.disabled = false; + } + // Change the visibility of renaming section if (bool) document.getElementById(id).style.display = 'flex'; else document.getElementById(id).style.display = 'none'; } diff --git a/cara/apps/templates/base/calculator.report.html.j2 b/cara/apps/templates/base/calculator.report.html.j2 index cb64de6b..e202c1c1 100644 --- a/cara/apps/templates/base/calculator.report.html.j2 +++ b/cara/apps/templates/base/calculator.report.html.j2 @@ -48,9 +48,9 @@