{% extends "base.html" %} {% load i18n %} {% load crispy_forms_filters %} {% block content %}

{{ team.name }}

{% trans "Name:" %}
{{ team.name }}
{% trans "Trigram:" %}
{{ team.trigram }}
{% trans "Email:" %}
{{ team.email }}
{% trans "Access code:" %}
{{ team.access_code }}
{% trans "Coaches:" %}
{% for coach in team.coaches.all %} {{ coach }}{% if not forloop.last %},{% endif %} {% empty %} {% trans "any" %} {% endfor %}
{% trans "Participants:" %}
{% for student in team.students.all %} {{ student }}{% if not forloop.last %},{% endif %} {% empty %} {% trans "any" %} {% endfor %}
{% trans "Tournament:" %}
{% if team.participation.tournament %} {{ team.participation.tournament }} {% else %} {% trans "any" %} {% endif %}
{% trans "Photo authorizations:" %}
{% for participant in team.participants.all %} {% if participant.photo_authorization %} {{ participant }}{% if not forloop.last %},{% endif %} {% else %} {{ participant }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %} {% endif %} {% endfor %}
{% trans "Health sheets:" %}
{% for student in team.students.all %} {% if student.under_18 %} {% if student.health_sheet %} {{ student }}{% if not forloop.last %},{% endif %} {% else %} {{ student }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %} {% endif %} {% endif %} {% endfor %}
{% trans "Parental authorizations:" %}
{% for student in team.students.all %} {% if student.under_18 %} {% if student.parental_authorization %} {{ student }}{% if not forloop.last %},{% endif %} {% else %} {{ student }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %} {% endif %} {% endif %} {% endfor %}
{% trans "Motivation letter:" %}
{% if team.motivation_letter %} {% trans "Download" %} {% else %} {% trans "Not uploaded yet" %} {% endif %} {% if user.registration.team == team and not user.registration.team.participation.valid or user.registration.is_admin %} {% endif %}

{% if team.participation.valid %}
{% trans "Access to team participation" %}
{% elif team.participation.valid == None %} {# Team did not ask for validation #} {% if user.registration.participates %} {% if can_validate %}
{% trans "Your team has at least 4 members and a coach and all authorizations were given: the team can be validated." %}
{% csrf_token %} {{ request_validation_form|crispy }}
{% else %}
{% trans "Your team must be composed of 4 members and a coach and each member must upload their authorizations and confirm its email address." %}
{% endif %} {% else %}
{% trans "This team didn't ask for validation yet." %}
{% endif %} {% else %} {# Team is waiting for validation #} {% if user.registration.participates %}
{% trans "Your validation is pending." %}
{% else %}
{% trans "The team requested to be validated. You may now control the authorizations and confirm that they can participate." %}
{% csrf_token %} {{ validation_form|crispy }}
{% endif %} {% endif %} {% trans "Upload motivation letter" as modal_title %} {% trans "Upload" as modal_button %} {% url "participation:upload_team_motivation_letter" pk=team.pk as modal_action %} {% include "base_modal.html" with modal_id="uploadMotivationLetter" modal_enctype="multipart/form-data" %} {% trans "Update team" as modal_title %} {% trans "Update" as modal_button %} {% url "participation:update_team" pk=team.pk as modal_action %} {% include "base_modal.html" with modal_id="updateTeam" %} {% trans "Leave team" as modal_title %} {% trans "Leave" as modal_button %} {% url "participation:team_leave" as modal_action %} {% include "base_modal.html" with modal_id="leaveTeam" modal_button_type="danger" %} {% endblock %} {% block extrajavascript %} {% endblock %}