{% extends 'base.html' %}
{% load i18n staticfiles tz stats %}
{% block title %}{% trans 'Squad Profile' %} / {{ block.super }}{% endblock title %}

{% block nav_tabs %}
    {% include 'inline/profile_tabs.html' %}
{% endblock nav_tabs %}

{% block content %}
    <section id="content">
        <div class="wrapper" style="font-size: 14px;">
            <div class="content_head">
                <div class="content_title">
                    {% trans 'Squad Profile' %}
                </div>
            </div>
            <form class="form" action="" method="post" enctype="multipart/form-data" onsubmit="this.submit.disabled=true;">
                {% if squad.logo %}
                    <div class="form_squad_logo"><img src="{{ squad.logo.url }}?{{ squad.logo.size }}" alt="" title=""></div>
                {% endif %}
                {% if form.non_field_errors %}
                    <div class="non_field_errors">
                        {% for error in form.non_field_errors %}
                            <div class="error">{{ error }}</div>
                        {% endfor %}
                    </div>
                {% endif %}
                {% csrf_token %}
                <input type="hidden" name="next" value="{{ next }}"/>
                {% for field in form %}
                    <div class="form_field {{ field|widget_type }}">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                        {% if field.help_text %}
                            <div class="help_text">{{ field.help_text }}</div>
                        {% endif %}
                        <div class="field_wrapper">{{ field }}</div>
                        {% if field.errors %}
                            {% for error in field.errors %}
                                <div class="error">{{ error }}</div>
                            {% endfor %}
                        {% endif %}
                    </div>
                {% endfor %}
                <div class="buttons">
                    <button type="submit" class="green">{% trans 'Save' context 'action' %}</button>
                </div>
            </form>
        </div>
    </section>
{% endblock content %}

{% block bottom %}
    {{ block.super }}
    <script src="{% static 'js/form.js' %}"></script>
{% endblock bottom %}
