some UI improvements on planned sessions
This commit is contained in:
@@ -145,6 +145,10 @@
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$("td #id_course").hide();
|
||||
$("th label[for='id_course']").hide();
|
||||
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
@@ -179,6 +183,20 @@
|
||||
$("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 == 'coursetest') {
|
||||
$("th label[for='id_course']").show();
|
||||
$("td #id_course").show();
|
||||
$("td #id_criterium").prop("value","none");
|
||||
$("td #id_sessionmode").prop("value","distance");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
$('#id_guidance').html("<p>Set mode to distance. For OTW Tests, only distance is allowed.</p><p>The exact value is not relevant because it is calculated from the course.</p>");
|
||||
}
|
||||
|
||||
if (this.value != 'coursetest') {
|
||||
$("th label[for='id_course']").hide();
|
||||
$("td #id_course").hide();
|
||||
}
|
||||
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
$('#id_guidance').html("<p>For Challenges, the default criterium is 'At Least'</p>");
|
||||
|
||||
Reference in New Issue
Block a user