{% extends "gestion/base.html" %}
{% load i18n %}
{% load static %}
{% block titre %}{% trans "Modification du profil" %}{% endblock %}

{% block content %}
<div id="main">
  <section class="wrapper style1">
  <div class="inner">
    <div class="row">

      <div class="6u 12u$(small)">
<h2>{% trans "Modification du profil" %} :</h2>
{% if error %}
<p>{{ error }}</p>
{% endif %}
{% if success %}
<p>{% trans "Changements enregistrés" %} !</p>
{% endif %}
<p><a href="{% url "change_password" %}" class="button">{% trans "Changer mon mot de passe" %}</a> &nbsp <a href="{% url "change-doodle-name" %}" class="button">{% trans "Changer mon nom pour les doodles" %}</a></p>
<form action="{% url 'change_membre' %}" method="post">
    {% csrf_token %}
    {{ comp_form.non_field_errors }}
    {{ user_form.as_p }}
    {% for field in comp_form %}
 <div class="fieldWrapper">
        {{ field.errors }}


        {% if field.id_for_label == "id_instru_autre" %}
  <div id="instru_autre_field" {% if comp_form.instru.value != "Autre" %} style="display: none; "{% endif %}>
{% elif field.id_for_label == "id_instru_bonus" %}
  <div id="instru_bonus_field" {% if comp_form.multi_instrumentiste.value == "Non" %} style="display: none; "{% endif %}>
{% else %}
  <div>
{% endif %}
     <p>{{ field.label_tag }}
        {{ field }}	{% if field.help_text %}
        {{ field.help_text|safe }}
            {% endif %}</p>
</div>




</div>

{% endfor %}

    <input type="submit" value="{% trans "Valider" %}" /> &nbsp; <a href="{% url 'home' %}" class="button alt">{% trans "Retour à l'acceuil" %}</a>
</form>
</div>
<div class ="6u 12u (small)">
  <span class="image fit">
    {% if photo %}
    <img src="{{photo.image.url}}" alt="" />  <div style="position:absolute;z-index:1;right:0;bottom:0">
    {% if photo.url %}
    <a href="{{photo.url}}" target="_blank" class="icon fa-copyright" style="color: {{photo.color}}"> {% if photo.auteur %}{{photo.auteur}}{%endif%}</a>
    {% elif photo.auteur %}
    <div class="icon fa-copyright" style="color: {{photo.color}}" > {{photo.auteur}}</div>

    {% endif %}
    </div>
    {% else %}
<img src="{% static 'images/registration.png' %}" alt="" />
<div style="position:absolute;z-index:1;right:0;bottom:0">
<div href="" class="icon fa-copyright"> lor_tie</div>
{% endif %}
</div>
</span>
</div>
</div>
</div>
</div></section></div>


{% endblock %}
