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

107 lines
3.2 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 au {{ 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 }} ({{ player.licence_id }})</li>
{% endfor %}
</ul>
{% endif %}
<!-- Add Player Form -->
{% if current_players|length < 2 %}
<div>
{% if user_without_licence %}
<div class="semibold">
Une licence est obligatoire pour vous inscrire :
</div>
{% endif %}
{{ add_player_form.licence_id.label_tag }}
{{ add_player_form.licence_id }}
{% if add_player_form.first_tournament or user_without_licence %}
{% if not user_without_licence %}
<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 }}
{% 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 >= 2 %}
<button type="submit" name="register_team" class="button">Confirmer l'inscription</button>
{% endif %}
</form>
{% if registration_successful %}
<p>Registration was successful! Your team and players have been registered.</p>
{% endif %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }}">{{ message }}</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% endblock %}