some UI improvements on planned sessions
This commit is contained in:
@@ -137,7 +137,10 @@
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("td #id_sessionmode").change(function() {
|
||||
$("td #id_course").hide();
|
||||
$("th label[for='id_course']").hide();
|
||||
|
||||
$("td #id_sessionmode").change(function() {
|
||||
|
||||
if (this.value == 'TRIMP') {
|
||||
$("td #id_sessionunit").prop("value","None");
|
||||
@@ -171,7 +174,23 @@
|
||||
$("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') {
|
||||
|
||||
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