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

{% block profil_content %}
<div class="row">
    <div class="col-lg-12"><br/>
        <h3><i class="bi bi-mortarboard-fill"></i> Changer la photo</h3><hr/>
    </div>
</div>
<div class="row col-lg-11">
    <center>{% include 'main_app/message.html' %}</center><br/>
    <p style="color:red;"><i>* Veuilliez ajouter une photo d'identité</i></p>
    <table class="table profil-cmd">
        <thead>
            <tr>
                <th colspan="1">CHANGER LA PHOTO</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <div class="row">
                        <div class="col-md-3">
                          <center>  {% if etudiant.avatar %}
                            <img src="{{etudiant.avatar.url}}" alt="photo" width="210" height="225" border="1">
                            {% else %}
                            <img src="{% static 'inscription/assets/img/user-default2.png' %}" alt="photo" width="225" height="225">
                            {% endif %} </center>
                        </div>
                        <div class="col-md-1"></div>
                        <div class="col-md-8"><br/>
                             <form action="#" method="post" class="checkout-form" enctype="multipart/form-data">
                                {% csrf_token %}
                                     <div class="form-group">
                                         <center>{{form.avatar}}</center><br/>
                                        <div class="col-lg-offset-2 col-lg-10">
                                          <center>
                                              <button type="submit" class="btn btn-success"><i class="bi bi-sd-card-fill"></i> Charger</button>
                                          </center>
                                        </div>
                                     </div>
                             </form>
                        </div>
                    </div>

                </td>

            </tr>
        </tbody>
    </table>
        <br/><br/>
</div>
{% endblock profil_content %}