small improvements
This commit is contained in:
@@ -2131,8 +2131,8 @@ regularsessiontypechoices = (
|
|||||||
('test','Mandatory Test'),
|
('test','Mandatory Test'),
|
||||||
('cycletarget','Total for a time period'),
|
('cycletarget','Total for a time period'),
|
||||||
('coursetest','OTW test over a course'),
|
('coursetest','OTW test over a course'),
|
||||||
('fastest_distance','Finds fastest time over a given distance'),
|
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||||
('fastest_time','Finds largest distance rowed over a given time'),
|
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||||
)
|
)
|
||||||
|
|
||||||
# model for Planned Session (Workout, Challenge, Test)
|
# model for Planned Session (Workout, Challenge, Test)
|
||||||
@@ -2145,8 +2145,8 @@ class PlannedSession(models.Model):
|
|||||||
('test','Mandatory Test'),
|
('test','Mandatory Test'),
|
||||||
('cycletarget','Total for a time period'),
|
('cycletarget','Total for a time period'),
|
||||||
('coursetest','OTW test over a course'),
|
('coursetest','OTW test over a course'),
|
||||||
('fastest_distance','Finds fastest time over a given distance'),
|
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||||
('fastest_time','Finds largest distance rowed over a given time'),
|
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||||
('race','Virtual challenge'),
|
('race','Virtual challenge'),
|
||||||
('indoorrace','Indoor Virtual challenge'),
|
('indoorrace','Indoor Virtual challenge'),
|
||||||
)
|
)
|
||||||
@@ -2157,8 +2157,8 @@ class PlannedSession(models.Model):
|
|||||||
('test','Mandatory Test'),
|
('test','Mandatory Test'),
|
||||||
('cycletarget','Total for a time period'),
|
('cycletarget','Total for a time period'),
|
||||||
('coursetest','OTW test over a course'),
|
('coursetest','OTW test over a course'),
|
||||||
('fastest_distance','Finds fastest time over a given distance'),
|
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||||
('fastest_time','Finds largest distance rowed over a given time'),
|
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||||
)
|
)
|
||||||
|
|
||||||
sessionmodechoices = (
|
sessionmodechoices = (
|
||||||
@@ -2838,8 +2838,8 @@ class PlannedSessionFormSmall(ModelForm):
|
|||||||
('test','Mandatory Test'),
|
('test','Mandatory Test'),
|
||||||
('cycletarget','Total for a time period'),
|
('cycletarget','Total for a time period'),
|
||||||
('coursetest','OTW test over a course'),
|
('coursetest','OTW test over a course'),
|
||||||
('fastest_distance','Finds fastest time over a given distance'),
|
('fastest_distance','Finds fastest time over a given distance on the water'),
|
||||||
('fastest_time','Finds largest distance rowed over a given time'),
|
('fastest_time','Finds largest distance rowed on the water over a given time'),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
@@ -207,6 +207,21 @@
|
|||||||
$("td #id_course").hide();
|
$("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') {
|
if (this.value == 'challenge') {
|
||||||
$("td #id_criterium").prop("value","minimum");
|
$("td #id_criterium").prop("value","minimum");
|
||||||
|
|||||||
Reference in New Issue
Block a user