mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 11:18:27 +02:00
The health sheet is required only for children
This commit is contained in:
@ -62,11 +62,13 @@
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Health sheets:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for participant in team.participants.all %}
|
||||
{% if participant.health_sheet %}
|
||||
<a href="{{ participant.health_sheet.url }}" data-turbolinks="false">{{ participant }}</a>{% if not forloop.last %},{% endif %}
|
||||
{% else %}
|
||||
{{ participant }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %}
|
||||
{% for student in team.students.all %}
|
||||
{% if student.under_18 %}
|
||||
{% if student.health_sheet %}
|
||||
<a href="{{ student.health_sheet.url }}" data-turbolinks="false">{{ student }}</a>{% if not forloop.last %},{% endif %}
|
||||
{% else %}
|
||||
{{ student }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
@ -177,7 +177,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
||||
context["can_validate"] = team.students.count() >= 4 and team.coaches.exists() and \
|
||||
all(r.email_confirmed for r in team.students.all()) and \
|
||||
all(r.photo_authorization for r in team.participants.all()) and \
|
||||
all(r.health_sheet for r in team.participants.all()) and \
|
||||
all(r.health_sheet for r in team.students.all() if r.under_18) and \
|
||||
all(r.parental_authorization for r in team.students.all() if r.under_18)
|
||||
|
||||
return context
|
||||
|
Reference in New Issue
Block a user