Private
Public Access
1
0

flexall using form

This commit is contained in:
Sander Roosendaal
2018-10-08 13:08:49 +02:00
parent 3a968b45fe
commit 320bc860c5
4 changed files with 153 additions and 220 deletions

View File

@@ -81,147 +81,40 @@
</div>
<ul class="main-content">
<li class="grid_2">
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
{% csrf_token %}
<table>
{{ optionsform.as_table }}
</table>
<input type="hidden" name="options" value="options">
<input class="button green small" value="Submit" type="Submit">
</form>
</li>
<li class="grid_2">
<p>Use this form to select a different date range:</p>
<p>
Select start and end date for a date range:
<form enctype="multipart/form-data" action="" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input name='daterange' class="button green" type="submit" value="Submit">
</form>
</li>
<li>
<li class="grid_4">
<p>Summary for {{ theuser.first_name }} {{ theuser.last_name }}
between {{ startdate|date }} and {{ enddate|date }}</p>
</li>
<li>
<ul class="cd-accordion-menu animated">
<li class="has-children" id="xaxis">
<input type="checkbox" name="group-x" id="group-x">
<label for="group-x">
X-Axis
</label>
<ul>
{% for key, value in axchoicesbasic.items %}
{% if key != 'None' %}
<li>
<a href="/rowers/flexall/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% if promember %}
{% for key, value in axchoicespro.items %}
<li>
<a href="/rowers/flexall/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endfor %}
{% else %}
{% for key, value in axchoicespro.items %}
<li>
<a href="/rowers/promembership">{{ value }}</a>
</li>
{% endfor %}
{% endif %}
</ul>
</li>
</ul>
</li>
<li>
<ul class="cd-accordion-menu animated">
<li class="has-children" id="yparam1">
<input type="checkbox" name="group-y1" id="group-y1">
<label for="group-y1">
Left
</label>
<ul>
{% for key, value in axchoicesbasic.items %}
{% if key not in noylist and key != 'None' %}
<li>
<a href="/rowers/flexall/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% if promember %}
{% for key, value in axchoicespro.items %}
{% if key not in noylist %}
<li>
<a href="/rowers/flexall/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% else %}
{% for key, value in axchoicespro.items %}
{% if key not in noylist %}
<li>
<a href="/rowers/promembership">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</li>
</ul>
</li>
<li>
<ul class="cd-accordion-menu animated">
<li class="has-children" id="yparam2">
<input type="checkbox" name="group-y2" id="group-y2">
<label for="group-y2">
Right
</label>
<ul>
{% for key, value in axchoicesbasic.items %}
{% if key not in noylist and key != 'None' %}
<li>
<a href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% if promember %}
{% for key, value in axchoicespro.items %}
{% if key not in noylist %}
<li>
<a href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d"}}/">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% else %}
{% for key, value in axchoicespro.items %}
{% if key not in noylist %}
<li>
<a href="/rowers/promembership">{{ value }}</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</li>
</ul>
</li>
<li class="grid_4">
<div id="id_chart">
{{ the_div|safe }}
</div>
</li>
<li>
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
<table>
{{ optionsform.as_table }}
</table>
<input type="hidden" name="options" value="options">
</li>
<li>
<table>
{{ form.as_table }}
</table>
</li>
<li>
<table>
{{ flexaxesform.as_table }}
</table>
</li>
<li>
{% csrf_token %}
<input class="button green small" value="Submit" type="Submit">
</form>
</li>
</ul>
{% endblock %}