{% extends "telemeta/profile_detail.html" %}
{% load i18n %}
{% load telemeta_tags %}

{% block title_buttons %}
 <a href="{% url "telemeta-profile-detail" usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
{% endblock %}

{% block content %}
      <div class="infos" style="padding-top: 1em;">
       <form method="POST" id="_editUserProfileForm" action="">{% csrf_token %}
        <table>
        {% for form in forms %}
            {% for field in form %}
            {% if not field.html_name in user_hidden_fields %}
            <tr>
                <tr><td class="error">{{ field.errors }}</td></tr>
                <td>{% trans field.label_tag %} : </td><td>{{ field }}</td>
            </tr>
            {% else %}
            <tr>
            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
            </tr>
            {% endif %}
            {% endfor %}
        {% endfor %}
        </table>
        <div align="center">
         <a href="{% url "telemeta-profile-detail" usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
         <a href="#" class="component_icon button icon_save"
   onclick="document.getElementById('_editUserProfileForm').submit(); return false;">{% trans "Save" %}</a>
        </div>
       </form>
      </div>
{% endblock %}
