adding unfold/fold all checkbox in trainingplan view
This commit is contained in:
@@ -6,6 +6,17 @@
|
||||
|
||||
|
||||
{% block main %}
|
||||
<script>
|
||||
function toggle(source) {
|
||||
checkboxes = document.querySelectorAll("input[type='checkbox']");
|
||||
for (var i=0, n=checkboxes.length;i<n;i++) {
|
||||
if (checkboxes[i].name.includes('selector')) {
|
||||
checkboxes[i].checked = source.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>Training Plan - {{ plan.name }}</h1>
|
||||
<p>This plan starts on {{ plan.startdate }} and ends on {{ plan.enddate }}.
|
||||
{% if plan.target %}
|
||||
@@ -18,6 +29,7 @@
|
||||
|
||||
<h2>Plan Macro, Meso and Micro Cycles</h2>
|
||||
|
||||
<p><input type="checkbox" href="" onClick="toggle(this)" />Unfold/Fold all</p>
|
||||
<ul class="cd-accordion-menu animated">
|
||||
<!-- Start Macrocycle For Loop -->
|
||||
{% for key, macrocycle in cycles.items %}
|
||||
|
||||
Reference in New Issue
Block a user