Merge branch 'release/v12.70'
This commit is contained in:
@@ -213,17 +213,17 @@ class CourseForm(forms.Form):
|
||||
super(CourseForm, self).__init__(*args, **kwargs)
|
||||
|
||||
# The form used for uploading files
|
||||
#class StandardsForm(forms.Form):
|
||||
# name = forms.CharField(max_length=150,label='Course Name')
|
||||
# file = forms.FileField(required=False,
|
||||
# validators=[must_be_csv])
|
||||
# notes = forms.CharField(required=False,
|
||||
# max_length=200,label='Course Notes',
|
||||
# widget=forms.Textarea)
|
||||
class StandardsForm(forms.Form):
|
||||
name = forms.CharField(max_length=150,label='Course Name')
|
||||
file = forms.FileField(required=False,
|
||||
validators=[must_be_csv])
|
||||
notes = forms.CharField(required=False,
|
||||
max_length=200,label='Course Notes',
|
||||
widget=forms.Textarea)
|
||||
|
||||
# def __init__(self, *args, **kwargs):
|
||||
# from django.forms.widgets import HiddenInput
|
||||
# super(StandardsForm, self).__init__(*args, **kwargs)
|
||||
def __init__(self, *args, **kwargs):
|
||||
from django.forms.widgets import HiddenInput
|
||||
super(StandardsForm, self).__init__(*args, **kwargs)
|
||||
|
||||
# The form used for uploading files
|
||||
class DocumentsForm(forms.Form):
|
||||
@@ -1230,11 +1230,11 @@ class RaceResultFilterForm(forms.Form):
|
||||
initial=['None','PR1','PR2','PR3','FES'],
|
||||
widget=forms.CheckboxSelectMultiple())
|
||||
|
||||
# entrycategory = forms.MultipleChoiceField(
|
||||
# choices = [],
|
||||
# label = 'Groups',
|
||||
# widget=forms.CheckboxSelectMultiple()
|
||||
# )
|
||||
entrycategory = forms.MultipleChoiceField(
|
||||
choices = [],
|
||||
label = 'Groups',
|
||||
widget=forms.CheckboxSelectMultiple()
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
if 'records' in kwargs:
|
||||
@@ -1244,18 +1244,19 @@ class RaceResultFilterForm(forms.Form):
|
||||
|
||||
if records:
|
||||
# group
|
||||
# thecategories = [record.entrycategory for record in records]
|
||||
# thecategories = list(set(thecategories))
|
||||
# if len(thecategories) <= 1:
|
||||
# del self.fields['entrycategory']
|
||||
# else:
|
||||
# categorychoices = []
|
||||
# for category in thecategories:
|
||||
## categorychoices.append(
|
||||
# (category.id,category)
|
||||
# )
|
||||
# self.fields['entrycategory'].choices = categorychoices
|
||||
# self.fields['entrycategory'].initial = [cat[0] for cat in categorychoices]
|
||||
thecategories = [record.entrycategory for record in records]
|
||||
thecategories = list(set(thecategories))
|
||||
if len(thecategories) <= 1:
|
||||
del self.fields['entrycategory']
|
||||
else:
|
||||
categorychoices = []
|
||||
for category in thecategories:
|
||||
if category is not None:
|
||||
categorychoices.append(
|
||||
(category.id,category)
|
||||
)
|
||||
self.fields['entrycategory'].choices = categorychoices
|
||||
self.fields['entrycategory'].initial = [cat[0] for cat in categorychoices]
|
||||
|
||||
# sex
|
||||
thesexes = [record.sex for record in records]
|
||||
|
||||
@@ -104,13 +104,11 @@
|
||||
<th>Challenge Time Zone</th><td>{{ race.timezone }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<tr>
|
||||
<th>Standard Times</th><td><a href="/rowers/standards/{{ race.coursestandards.id }}/">{{ race.coursestandards }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
<tr>
|
||||
<th>
|
||||
{{ race.sessionmode }} challenge
|
||||
@@ -270,20 +268,16 @@
|
||||
<th> </th>
|
||||
<th>Name</th>
|
||||
<th>Team Name</th>
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<th>Group</th>
|
||||
{% else %}
|
||||
{% endcomment %}
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>Class</th>
|
||||
{% if race.sessiontype == 'race' %}
|
||||
<th>Boat</th>
|
||||
{% comment %}
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
{% endif %}
|
||||
<th>Time<a href="?order_by=duration">▼</th>
|
||||
<th>Distance<a href="?order_by=-distance">▼</th>
|
||||
@@ -302,11 +296,9 @@
|
||||
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
|
||||
{{ result.username }}</a></td>
|
||||
<td>{{ result.teamname }}</td>
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<td>{{ result.entrycategory }}</td>
|
||||
{% else %}
|
||||
{% endcomment %}
|
||||
<td>{{ result.age }}</td>
|
||||
<td>{{ result.sex }}</td>
|
||||
<td>{{ result.weightcategory }}</td>
|
||||
@@ -321,16 +313,12 @@
|
||||
{% if race.sessiontype == 'race' %}
|
||||
<td>{{ result.boattype }}</td>
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
<td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td>
|
||||
<td>{{ result.distance }} m</td>
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<td>{{ result.points }}</td>
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
|
||||
Details</a>
|
||||
@@ -421,12 +409,10 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Team Name</th>
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<th>Group</th>
|
||||
<th>Age</th>
|
||||
{% else %}
|
||||
{% endcomment %}
|
||||
{% if race.sessiontype == 'race' %}
|
||||
<th>Boat</th>
|
||||
{% endif %}
|
||||
@@ -435,9 +421,7 @@
|
||||
<th>Gender</th>
|
||||
<th>Weight Category</th>
|
||||
<th>Adaptive</th>
|
||||
{% comment %}
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
</tr>
|
||||
<tbody>
|
||||
{% for record in records %}
|
||||
@@ -585,7 +569,6 @@
|
||||
review and reject entries. If you are disqualified in this
|
||||
way, you will receive an email with the reason.
|
||||
</p>
|
||||
{% comment %}
|
||||
{% if race.coursestandards %}
|
||||
<p>
|
||||
Standard Times are a way to compare results in a race category with
|
||||
@@ -597,7 +580,6 @@
|
||||
be limited to those in the selected set of Standard Times.
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -94,7 +94,7 @@ from rowers.forms import (
|
||||
EmailForm, RegistrationForm, RegistrationFormTermsOfService,
|
||||
RegistrationFormUniqueEmail,RegistrationFormSex,
|
||||
CNsummaryForm,UpdateWindForm,
|
||||
# StandardsForm,
|
||||
StandardsForm,
|
||||
UpdateStreamForm,WorkoutMultipleCompareForm,ChartParamChoiceForm,
|
||||
FusionMetricChoiceForm,BoxPlotChoiceForm,MultiFlexChoiceForm,
|
||||
TrendFlexModalForm,WorkoutSplitForm,WorkoutJoinParamForm,
|
||||
@@ -115,7 +115,7 @@ from rowers.models import (
|
||||
AlertEditForm, ConditionEditForm,
|
||||
PlannedSessionComment,CoachRequest,CoachOffer,
|
||||
VideoAnalysis,ShareKey,
|
||||
# StandardCollection,CourseStandard,
|
||||
StandardCollection,CourseStandard,
|
||||
)
|
||||
from rowers.models import (
|
||||
RowerPowerForm,RowerForm,GraphImage,AdvancedWorkoutForm,
|
||||
|
||||
Reference in New Issue
Block a user