diff --git a/app/javascript/views/plans/download.js b/app/javascript/views/plans/download.js index 23362dc..e629812 100644 --- a/app/javascript/views/plans/download.js +++ b/app/javascript/views/plans/download.js @@ -15,7 +15,7 @@ } }); - $('#select-all-phase').on('click', (e) => { + $('#select-all-phases').on('click', (e) => { if (e.target.checked) { // Iterate each checkbox $('.phase-checkbox').each(function check() { @@ -27,4 +27,17 @@ }); } }); + + $('#select-all-datasets').on('click', (e) => { + if (e.target.checked) { + // Iterate each checkbox + $('.dataset-checkbox').each(function check() { + this.checked = true; + }); + } else { + $('.dataset-checkbox').each(function check() { + this.checked = false; + }); + } + }); }); diff --git a/app/views/branded/plans/_download_form.html.erb b/app/views/branded/plans/_download_form.html.erb index e5c5f33..49789ee 100644 --- a/app/views/branded/plans/_download_form.html.erb +++ b/app/views/branded/plans/_download_form.html.erb @@ -6,8 +6,8 @@
<%= d_("dmpopidor", "Select datasets to download") %>