small improvements
This commit is contained in:
@@ -2131,8 +2131,8 @@ regularsessiontypechoices = (
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||
)
|
||||
|
||||
# model for Planned Session (Workout, Challenge, Test)
|
||||
@@ -2145,8 +2145,8 @@ class PlannedSession(models.Model):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||
('race','Virtual challenge'),
|
||||
('indoorrace','Indoor Virtual challenge'),
|
||||
)
|
||||
@@ -2157,8 +2157,8 @@ class PlannedSession(models.Model):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||
)
|
||||
|
||||
sessionmodechoices = (
|
||||
@@ -2838,8 +2838,8 @@ class PlannedSessionFormSmall(ModelForm):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -207,6 +207,21 @@
|
||||
$("td #id_course").hide();
|
||||
}
|
||||
|
||||
if (this.value == 'fastest_distance') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionunit").prop("value","m");
|
||||
$("td #id_sessionmode").prop("value","distance")
|
||||
$('#id_guidance').html("<p>For Fastest Distance, set an exact number of meters</p>");
|
||||
}
|
||||
|
||||
if (this.value == 'fastest_time') {
|
||||
$("td #id_criterium").prop("value","exact");
|
||||
$("td #id_sessionunit").prop("value","min");
|
||||
$("td #id_sessionmode").prop("value","time")
|
||||
$('#id_guidance').html("<p>For Fastest Time, set an exact number of minutes</p>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (this.value == 'challenge') {
|
||||
$("td #id_criterium").prop("value","minimum");
|
||||
|
||||
Reference in New Issue
Block a user