You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
5.0 KiB
140 lines
5.0 KiB
{% extends 'tournaments/base.html' %}
|
|
|
|
{% block head_title %}{{ tournament.display_name }} : Informations{% endblock %}
|
|
{% block first_title %}{{ tournament.event.display_name }}{% endblock %}
|
|
{% block second_title %}{{ tournament.display_name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{% load static %}
|
|
{% load tz %}
|
|
|
|
<nav class="margin10">
|
|
<a href="{% url 'tournament-info' tournament.id %}" class="topmargin5">Informations</a>
|
|
</nav>
|
|
|
|
<div class="grid-x">
|
|
|
|
<div class="cell medium-6 large-6 my-block">
|
|
<h1 class="club my-block topmargin20">Inscription : {{ tournament.display_name }} {{ tournament.get_federal_age_category_display}}</h1 >
|
|
|
|
|
|
<div class="bubble">
|
|
|
|
{% if registration_successful %}
|
|
<p>Merci, l'inscription a bien été envoyée au juge-arbitre.</p>
|
|
<p style="text-align: justify;">
|
|
Un email de confirmation a été envoyé à {{ user.email }} pour confirmer votre inscription. Pensez à vérifier vos spams si vous ne recevez pas l'email. En cas de problème, contactez le juge-arbitre.
|
|
</p>
|
|
{% else %}
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
|
|
<!-- Team Registration Form -->
|
|
<div>
|
|
<p>
|
|
<div class="semibold">
|
|
Informations de contact
|
|
</div>
|
|
</p>
|
|
{{ team_form.as_p }} <!-- Render team registration form fields here -->
|
|
</div>
|
|
|
|
<!-- Show players added to the team only if there are players added -->
|
|
{% if current_players %}
|
|
<p>
|
|
<div class="semibold">
|
|
Constitution de votre équipe
|
|
</div>
|
|
</p>
|
|
<ul>
|
|
{% for player in current_players %}
|
|
<li>{{ player.first_name }} {{ player.last_name }}{% if player.licence_id %} ({{ player.licence_id }}){% endif %}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<!-- Add Player Form -->
|
|
{% if current_players|length < 2 %}
|
|
<div>
|
|
{% if current_players|length == 1 %}
|
|
<div class="semibold">
|
|
Inscrivez votre partenaire
|
|
</div>
|
|
{% endif %}
|
|
{% if current_players|length == 0 and add_player_form.user_without_licence and tournament.license_is_required %}
|
|
<div class="semibold">
|
|
Une licence est obligatoire pour vous inscrire :
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if tournament.license_is_required %}
|
|
{{ add_player_form.licence_id.label_tag }}
|
|
{{ add_player_form.licence_id }}
|
|
{% endif %}
|
|
{% if add_player_form.first_tournament or add_player_form.user_without_licence or tournament.license_is_required is False %}
|
|
{% if not add_player_form.user_without_licence and tournament.license_is_required is True %}
|
|
<div class="semibold">
|
|
Précisez les informations du joueur :
|
|
</div>
|
|
{% endif %}
|
|
{{ add_player_form.first_name.label_tag }}
|
|
{{ add_player_form.first_name }}
|
|
{{ add_player_form.last_name.label_tag }}
|
|
{{ add_player_form.last_name }}
|
|
{% if tournament.license_is_required is False %}
|
|
{{ add_player_form.licence_id.label_tag }}
|
|
{% if tournament.license_is_required is False %}(facultatif){% endif %}
|
|
{{ add_player_form.licence_id }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<div class="margin10">
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }}">{{ message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<button type="submit" name="add_player" class="rounded-button">
|
|
{% if add_player_form.user_without_licence %}
|
|
Confirmer
|
|
{% else %}
|
|
{% if current_players|length == 0 %}
|
|
Confirmer
|
|
{% else %}
|
|
Ajouter un partenaire
|
|
{% endif %}
|
|
{% endif %}
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Show players added to the team only if there are players added -->
|
|
{% if current_players|length >= tournament.minimum_player_per_team %}
|
|
<div class="margin10">
|
|
</div>
|
|
<div class="semibold margin10">
|
|
{% if tournament.get_waiting_list_position == 1 %}
|
|
Tournoi complet, {{ tournament.get_waiting_list_position }} équipe en liste d'attente actuellement.
|
|
{% elif tournament.get_waiting_list_position > 1 %}
|
|
Tournoi complet, {{ tournament.get_waiting_list_position }} équipes en liste d'attente actuellement.
|
|
{% elif tournament.get_waiting_list_position == 0 %}
|
|
Tournoi complet, vous seriez la première équipe en liste d'attente.
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div>
|
|
<button type="submit" name="register_team" class="rounded-button">
|
|
{% if tournament.get_waiting_list_position < 0 %}
|
|
Confirmer l'inscription
|
|
{% else %}
|
|
Se mettre en liste d'attente
|
|
{% endif %}
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|