{% extends 'profil/profil_base.html' %}
{% load static %}

{% block title %} Modifier le profil{% endblock title %}

{% block profil_content %}
<div class="row">
    <div class="col-lg-12"><br/>
        <h3><i class="bi bi-file-fill"></i> Ajouter un document</h3><hr/>
    </div>
</div>
<div class="row col-lg-10">
    <div class="row">
        <div class="col-lg-2"></div>
        <div class="col-lg-11"><br/>
            <center>{% include 'parts/message.html' %}</center><br/>
            {% if hide_form %}
            <center>
                <a class="btn btn-secondary" href="{% url 'liste_document' %}"><i class="bi bi-arrow-left-circle-fill"></i> Mes documents</a>
            </center>
            {% endif %}
            <table class="info-tb" {% if hide_form %}hidden{% endif %}>
                <tr>
                    <td class="p-label">Année</td>
                    <td><span>: {% if not annee %}{% else %} {{annee}}{% endif %}</span></td>
                </tr>
                <tr>
                    <td class="p-label">N<sup>o</sup> Candidat</td>
                    <td><span>: {% if not candidat.nc %}{% else %} {{candidat.nc}}{% endif %}</span></td>
                </tr>
                <tr>
                    <td class="p-label">Nom et Prénoms</td>
                    <td><span>: {{candidat}}</span></td>
                </tr>
                <tr>
                    <td class="p-label">Type de document</td>
                    <td><span style="color:red;">: {% if not docs %}{% else %} {{docs.description}}{% endif %}</span></td>
                </tr>

            </table>
            <form action="#" method="post" class="checkout-form" enctype="multipart/form-data" {% if hide_form %}hidden{% endif %}>
                    {% csrf_token %}
                <p style="color:red;text-align:center;"><i>**** Seul le format image est autorisé (.jpg, .png, .jpeg, ...)</i> </p>
                         <div class="form-group">
                             <center>{{form.document}}</center><br/>
                            <div class="col-lg-offset-2 col-lg-10">
                              <center><button type="submit" class="btn btn-success">Charger</button></center>
                            </div>
                          </div>

                </form><br/><br/>
            <br/>
        </div>
        <div class="col-lg-2"></div>
    </div>
</div>
{% endblock profil_content %}