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.
 
 
 
 
padelclub_backend/tournaments/templates/register_tournament.html

108 lines
3.5 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é au 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 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 user_without_licence or tournament.license_is_required is False %}
{% if not 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 %}
<button type="submit" name="add_player" class="button">
{% if user_without_licence %}
Ajouter-vous à l'équipe
{% else %}
Ajouter un partenaire
{% 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 %}
<button type="submit" name="register_team" class="button">Confirmer l'inscription</button>
{% endif %}
</form>
{% for message in messages %}
<div class="alert alert-{{ message.tags }}">{{ message }}</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% endblock %}