a bit more logic navigating the training planning functions
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
</p>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||
<p><a href="/rowers/sessions/teamcreate/?startdate={{ timeperiod|previousperiodstart }}&enddate={{ timeperiod|previousperiodend}}">Back by
|
||||
{{ timeperiod|timedeltadays }} days</a>
|
||||
</p>
|
||||
<p><a href="/rowers/sessions/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||
<p><a href="/rowers/sessions/teamcreate/?startdate={{ timeperiod|nextperiodstart }}&enddate={{ timeperiod|nextperiodend}}">Forward by
|
||||
{{ timeperiod|timedeltadays }} days</a>
|
||||
</p>
|
||||
</li>
|
||||
@@ -34,21 +34,21 @@
|
||||
Please correct the error{{ form.errors|pluralize }} below.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_2">
|
||||
{% csrf_token %}
|
||||
|
||||
|
||||
<h1>New Team Session</h1>
|
||||
<table>
|
||||
{{ teamform.as_table }}
|
||||
{{ teamform.as_table }}
|
||||
</table>
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
<input class="button green" type="submit" value="Save">
|
||||
<div id="id_guidance" class="padded">
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{% if plannedsessions %}
|
||||
@@ -90,15 +90,18 @@
|
||||
<td>
|
||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/">Clone</a>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/">Delete</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/maketemplate/">Save</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
</p>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="grid_2">
|
||||
@@ -150,7 +153,7 @@
|
||||
$(document).ready(function(){
|
||||
$("td #id_course").hide();
|
||||
$("th label[for='id_course']").hide();
|
||||
|
||||
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
@@ -165,16 +168,16 @@
|
||||
$("td #id_sessionunit").prop("value","min");
|
||||
$('#id_guidance').html("<p>Time: Set value to minutes</p>");
|
||||
}
|
||||
|
||||
|
||||
if (this.value == 'rScore') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
$('#id_guidance').html("<p>rScore has no unit</p>");
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("td #id_sessiontype").change(function() {
|
||||
|
||||
|
||||
if (this.value == 'session') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
$('#id_guidance').html("<p>For Training Sessions, the default criterium is 'Approximately'</p>");
|
||||
@@ -205,18 +208,18 @@
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
||||
}
|
||||
|
||||
|
||||
if (this.value == 'cycletarget') {
|
||||
$("td #id_criterium").prop("value","none");
|
||||
$('#id_guidance').html("<p>For Cycle Targets, the default criterium is 'Approximately'</p>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
$("td #id_sessionunit").change(function() {
|
||||
|
||||
|
||||
if (this.value == 'm') {
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$('#id_guidance').html("<p>Mode was set to distance</p>");
|
||||
@@ -233,13 +236,13 @@
|
||||
$("td #id_sessionmode").prop("value","time");
|
||||
$('#id_guidance').html("<p>Mode was set to time</p>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user