Private
Public Access
1
0

Merge branch 'release/v12.70'

This commit is contained in:
Sander Roosendaal
2020-05-31 21:51:09 +02:00
3 changed files with 30 additions and 47 deletions

View File

@@ -213,17 +213,17 @@ class CourseForm(forms.Form):
super(CourseForm, self).__init__(*args, **kwargs) super(CourseForm, self).__init__(*args, **kwargs)
# The form used for uploading files # The form used for uploading files
#class StandardsForm(forms.Form): class StandardsForm(forms.Form):
# name = forms.CharField(max_length=150,label='Course Name') name = forms.CharField(max_length=150,label='Course Name')
# file = forms.FileField(required=False, file = forms.FileField(required=False,
# validators=[must_be_csv]) validators=[must_be_csv])
# notes = forms.CharField(required=False, notes = forms.CharField(required=False,
# max_length=200,label='Course Notes', max_length=200,label='Course Notes',
# widget=forms.Textarea) widget=forms.Textarea)
# def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# from django.forms.widgets import HiddenInput from django.forms.widgets import HiddenInput
# super(StandardsForm, self).__init__(*args, **kwargs) super(StandardsForm, self).__init__(*args, **kwargs)
# The form used for uploading files # The form used for uploading files
class DocumentsForm(forms.Form): class DocumentsForm(forms.Form):
@@ -1230,11 +1230,11 @@ class RaceResultFilterForm(forms.Form):
initial=['None','PR1','PR2','PR3','FES'], initial=['None','PR1','PR2','PR3','FES'],
widget=forms.CheckboxSelectMultiple()) widget=forms.CheckboxSelectMultiple())
# entrycategory = forms.MultipleChoiceField( entrycategory = forms.MultipleChoiceField(
# choices = [], choices = [],
# label = 'Groups', label = 'Groups',
# widget=forms.CheckboxSelectMultiple() widget=forms.CheckboxSelectMultiple()
# ) )
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
if 'records' in kwargs: if 'records' in kwargs:
@@ -1244,18 +1244,19 @@ class RaceResultFilterForm(forms.Form):
if records: if records:
# group # group
# thecategories = [record.entrycategory for record in records] thecategories = [record.entrycategory for record in records]
# thecategories = list(set(thecategories)) thecategories = list(set(thecategories))
# if len(thecategories) <= 1: if len(thecategories) <= 1:
# del self.fields['entrycategory'] del self.fields['entrycategory']
# else: else:
# categorychoices = [] categorychoices = []
# for category in thecategories: for category in thecategories:
## categorychoices.append( if category is not None:
# (category.id,category) categorychoices.append(
# ) (category.id,category)
# self.fields['entrycategory'].choices = categorychoices )
# self.fields['entrycategory'].initial = [cat[0] for cat in categorychoices] self.fields['entrycategory'].choices = categorychoices
self.fields['entrycategory'].initial = [cat[0] for cat in categorychoices]
# sex # sex
thesexes = [record.sex for record in records] thesexes = [record.sex for record in records]

View File

@@ -104,13 +104,11 @@
<th>Challenge Time Zone</th><td>{{ race.timezone }}</td> <th>Challenge Time Zone</th><td>{{ race.timezone }}</td>
</tr> </tr>
{% endif %} {% endif %}
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<tr> <tr>
<th>Standard Times</th><td><a href="/rowers/standards/{{ race.coursestandards.id }}/">{{ race.coursestandards }}</a></td> <th>Standard Times</th><td><a href="/rowers/standards/{{ race.coursestandards.id }}/">{{ race.coursestandards }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
{% endcomment %}
<tr> <tr>
<th> <th>
{{ race.sessionmode }} challenge {{ race.sessionmode }} challenge
@@ -270,20 +268,16 @@
<th>&nbsp;</th> <th>&nbsp;</th>
<th>Name</th> <th>Name</th>
<th>Team Name</th> <th>Team Name</th>
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<th>Group</th> <th>Group</th>
{% else %} {% else %}
{% endcomment %}
<th>&nbsp;</th> <th>&nbsp;</th>
<th>&nbsp;</th> <th>&nbsp;</th>
<th>&nbsp;</th> <th>&nbsp;</th>
<th>Class</th> <th>Class</th>
{% if race.sessiontype == 'race' %} {% if race.sessiontype == 'race' %}
<th>Boat</th> <th>Boat</th>
{% comment %}
{% endif %} {% endif %}
{% endcomment %}
{% endif %} {% endif %}
<th>Time<a href="?order_by=duration">&#9660;</th> <th>Time<a href="?order_by=duration">&#9660;</th>
<th>Distance<a href="?order_by=-distance">&#9660;</th> <th>Distance<a href="?order_by=-distance">&#9660;</th>
@@ -302,11 +296,9 @@
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/"> <a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
{{ result.username }}</a></td> {{ result.username }}</a></td>
<td>{{ result.teamname }}</td> <td>{{ result.teamname }}</td>
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<td>{{ result.entrycategory }}</td> <td>{{ result.entrycategory }}</td>
{% else %} {% else %}
{% endcomment %}
<td>{{ result.age }}</td> <td>{{ result.age }}</td>
<td>{{ result.sex }}</td> <td>{{ result.sex }}</td>
<td>{{ result.weightcategory }}</td> <td>{{ result.weightcategory }}</td>
@@ -321,16 +313,12 @@
{% if race.sessiontype == 'race' %} {% if race.sessiontype == 'race' %}
<td>{{ result.boattype }}</td> <td>{{ result.boattype }}</td>
{% endif %} {% endif %}
{% comment %}
{% endif %} {% endif %}
{% endcomment %}
<td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td> <td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td>
<td>{{ result.distance }} m</td> <td>{{ result.distance }} m</td>
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<td>{{ result.points }}</td> <td>{{ result.points }}</td>
{% endif %} {% endif %}
{% endcomment %}
<td> <td>
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/"> <a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
Details</a> Details</a>
@@ -421,12 +409,10 @@
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Team Name</th> <th>Team Name</th>
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<th>Group</th> <th>Group</th>
<th>Age</th> <th>Age</th>
{% else %} {% else %}
{% endcomment %}
{% if race.sessiontype == 'race' %} {% if race.sessiontype == 'race' %}
<th>Boat</th> <th>Boat</th>
{% endif %} {% endif %}
@@ -435,9 +421,7 @@
<th>Gender</th> <th>Gender</th>
<th>Weight Category</th> <th>Weight Category</th>
<th>Adaptive</th> <th>Adaptive</th>
{% comment %}
{% endif %} {% endif %}
{% endcomment %}
</tr> </tr>
<tbody> <tbody>
{% for record in records %} {% for record in records %}
@@ -585,7 +569,6 @@
review and reject entries. If you are disqualified in this review and reject entries. If you are disqualified in this
way, you will receive an email with the reason. way, you will receive an email with the reason.
</p> </p>
{% comment %}
{% if race.coursestandards %} {% if race.coursestandards %}
<p> <p>
Standard Times are a way to compare results in a race category with 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. be limited to those in the selected set of Standard Times.
</p> </p>
{% endif %} {% endif %}
{% endcomment %}
</div> </div>
</li> </li>
</ul> </ul>

View File

@@ -94,7 +94,7 @@ from rowers.forms import (
EmailForm, RegistrationForm, RegistrationFormTermsOfService, EmailForm, RegistrationForm, RegistrationFormTermsOfService,
RegistrationFormUniqueEmail,RegistrationFormSex, RegistrationFormUniqueEmail,RegistrationFormSex,
CNsummaryForm,UpdateWindForm, CNsummaryForm,UpdateWindForm,
# StandardsForm, StandardsForm,
UpdateStreamForm,WorkoutMultipleCompareForm,ChartParamChoiceForm, UpdateStreamForm,WorkoutMultipleCompareForm,ChartParamChoiceForm,
FusionMetricChoiceForm,BoxPlotChoiceForm,MultiFlexChoiceForm, FusionMetricChoiceForm,BoxPlotChoiceForm,MultiFlexChoiceForm,
TrendFlexModalForm,WorkoutSplitForm,WorkoutJoinParamForm, TrendFlexModalForm,WorkoutSplitForm,WorkoutJoinParamForm,
@@ -115,7 +115,7 @@ from rowers.models import (
AlertEditForm, ConditionEditForm, AlertEditForm, ConditionEditForm,
PlannedSessionComment,CoachRequest,CoachOffer, PlannedSessionComment,CoachRequest,CoachOffer,
VideoAnalysis,ShareKey, VideoAnalysis,ShareKey,
# StandardCollection,CourseStandard, StandardCollection,CourseStandard,
) )
from rowers.models import ( from rowers.models import (
RowerPowerForm,RowerForm,GraphImage,AdvancedWorkoutForm, RowerPowerForm,RowerForm,GraphImage,AdvancedWorkoutForm,