added age verification and improvements on plannedsession
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="grid_12 alpha">
|
||||
<div id="left" class="grid_6 alpha">
|
||||
<h1>Edit Session {{ thesession.name }}</h1>
|
||||
</div>
|
||||
<h1>Edit Session</h1>
|
||||
</div>
|
||||
<div id="timeperiod" class="grid_2 dropdown">
|
||||
<button class="grid_2 alpha button gray small dropbtn">Select Time Period ({{ timeperiod|verbosetimeperiod }})</button>
|
||||
<div class="dropdown-content">
|
||||
@@ -47,29 +47,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_12 alpha">
|
||||
<div class="grid_6 alpha">
|
||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||
{% if form.errors %}
|
||||
<p style="color: red;">
|
||||
Please correct the error{{ form.errors|pluralize }} below.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<div class="grid_1 prefix_2 alpha">
|
||||
<a class="red button small" href="/rowers/sessions/{{ thesession.id }}/deleteconfirm">Delete</a>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<a class="gray button small" href="/rowers/sessions/{{ thesession.id }}/clone">Clone</a>
|
||||
</div>
|
||||
<div id="formbutton" class="grid_1 suffix_1 omega">
|
||||
<input class="button green" type="submit" value="Save">
|
||||
</div>
|
||||
</div>
|
||||
<div id="right" class="grid_6 omega">
|
||||
<div id="right" class="grid_6 alpha">
|
||||
<h1>Plan</h1>
|
||||
<p>
|
||||
Click on session name to view
|
||||
@@ -124,8 +102,76 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="grid_6 omega">
|
||||
<h1>{{ thesession.name }}</h1>
|
||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||
{% if form.errors %}
|
||||
<p style="color: red;">
|
||||
Please correct the error{{ form.errors|pluralize }} below.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<div class="grid_1 prefix_2 alpha">
|
||||
<a class="red button small" href="/rowers/sessions/{{ thesession.id }}/deleteconfirm">Delete</a>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<a class="gray button small" href="/rowers/sessions/{{ thesession.id }}/clone">Clone</a>
|
||||
</div>
|
||||
<div id="formbutton" class="grid_1 suffix_1 omega">
|
||||
<input class="button green" type="submit" value="Save">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
if (this.value == 'distance') {
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
}
|
||||
if (this.value == 'time') {
|
||||
$("td #id_sessionunit").prop("value","min");
|
||||
}
|
||||
|
||||
if (this.value == 'rScore') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("td #id_sessiontype").change(function() {
|
||||
|
||||
if (this.value == 'session') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
}
|
||||
if (this.value == 'test') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
}
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user