toggle multiple check boxes
This commit is contained in:
@@ -5,6 +5,14 @@
|
||||
{% block title %}Workouts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<script>
|
||||
function toggle(source) {
|
||||
checkboxes = document.querySelectorAll("input[type='checkbox']");
|
||||
for(var i=0, n=checkboxes.length;i<n;i++) {
|
||||
checkboxes[i].checked = source.checked;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{% if team %}
|
||||
@@ -76,7 +84,7 @@
|
||||
|
||||
{% if workouts %}
|
||||
|
||||
|
||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||
<table width="100%" class="listtable">
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user