Select all checkbox

This commit is contained in:
Mouse Reeve 2020-11-13 10:14:24 -08:00
parent 86504989b4
commit 6300c37a4e
2 changed files with 10 additions and 0 deletions

View file

@ -20,6 +20,10 @@ function reply(e) {
return true;
}
function selectAll(el) {
el.parentElement.querySelectorAll('[type="checkbox"]')
.forEach(t => t.checked=true);
}
function rate_stars(e) {
e.preventDefault();

View file

@ -50,6 +50,12 @@
{% endfor %}
</fieldset>
</ul>
<div class="block pt-1" onclick="selectAll(this)">
<label class="label">
<input type="checkbox" class="checkbox">
Select all
</label>
</div>
<button class="button" type="submit">Retry items</button>
{% else %}
<ul>