Skip to content
Snippets Groups Projects
Commit a1e7b493 authored by Julien Schmidt's avatar Julien Schmidt
Browse files

add button to select YES for all applicants

parent 0a050ae0
No related branches found
No related tags found
No related merge requests found
Pipeline #469 passed
......@@ -18,3 +18,13 @@ document.querySelectorAll(".vote-list input[type='radio']").forEach(function(inp
voteList.querySelector("tfoot .yes").innerText = (max-count) + " remaining";
}
});
document.querySelectorAll("#all-yes").forEach(function(btn) {
btn.onclick = function() {
var voteList = document.querySelector('.vote-list');
voteList.querySelectorAll("input[type='radio'][value='accept']").forEach(function(input) {
input.checked = true;
input.onchange();
});
}
});
......@@ -41,6 +41,11 @@
Your vote is anonymous.
</div>
</div>
{% if max_votes_yes > 1 and max_votes_yes >= form.num_applications %}
<div class="mt-4 text-right">
<button type="button" class="btn btn-success" id="all-yes">Select YES for all {{ form.num_applications }} applicants</button>
</div>
{% endif %}
<table class="table table-sm vote-list" data-max-votes-yes="{{ max_votes_yes }}">
<thead class="thead-light">
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment