Private
Public Access
1
0

guidance added for plannedsession forms

This commit is contained in:
Sander Roosendaal
2018-02-16 09:42:57 +01:00
parent 79fd61ce3b
commit af2ae853bd
8 changed files with 328 additions and 64 deletions

View File

@@ -124,6 +124,10 @@
<div id="formbutton" class="grid_1 suffix_1 omega">
<input class="button green" type="submit" value="Save">
</div>
<div class="grid_6" id="id_guidance">
</div>
</div>
@@ -139,16 +143,20 @@
if (this.value == 'TRIMP') {
$("td #id_sessionunit").prop("value","None");
$('#id_guidance').html("<p>TRIMP has no unit</p>");
}
if (this.value == 'distance') {
$("td #id_sessionunit").prop("value","m");
$('#id_guidance').html("<p>Distance: Set value to meters</p>");
}
if (this.value == 'time') {
$("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>");
}
});
@@ -157,18 +165,22 @@
if (this.value == 'session') {
$("td #id_criterium").prop("value","none");
$('#id_guidance').html("<p>For Training Sessions, the default criterium is 'Approximately'</p>");
}
if (this.value == 'test') {
$("td #id_criterium").prop("value","exact");
$("td #id_sessionmode").prop("value","distance");
$("td #id_sessionunit").prop("value","m");
$('#id_guidance').html("<p>Set mode to distance. For Mandatory Tests, only distance or time are allowed.</p><p>For Mandatory Tests, the only criterium is 'Exactly'</p>");
}
if (this.value == 'challenge') {
$("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>");
}
}
@@ -179,15 +191,19 @@
if (this.value == 'm') {
$("td #id_sessionmode").prop("value","distance");
$('#id_guidance').html("<p>Mode was set to distance</p>");
}
if (this.value == 'km') {
$("td #id_sessionmode").prop("value","distance");
$('#id_guidance').html("<p>Mode was set to distance</p>");
}
if (this.value == 'None') {
$("td #id_sessionmode").prop("value","rScore");
$('#id_guidance').html("<p>Mode was set to rScore</p>");
}
if (this.value == 'min') {
$("td #id_sessionmode").prop("value","time");
$('#id_guidance').html("<p>Mode was set to time</p>");
}
}
@@ -199,4 +215,5 @@
});
</script>
{% endblock %}