{% extends "telemeta/collection_detail.html" %}
{% load i18n %}
{% load telemeta_utils %}

{% block title %}
    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : NEW
{% endblock %}

{% block title_buttons %}
     <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
{% endblock %}

{% block infos %}
        <div class="infos">
        <form method="post" id ="_addCollectionForm" action="">{% csrf_token %}
        <table>
        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
        {% for field in form %}
            {% if not field.html_name == "copied_from_item" %}
            <tr>
                <tr><td class="error">{{ field.errors }}</td></tr>
                <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
            </tr>
            {% endif %}
        {% endfor %}
        </table>
        <div align="center">
            <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
            <a href="#" class="component_icon button icon_save"
                onclick="document.getElementById('_addCollectionForm').submit(); return false;">{% trans "Save" %}</a>
        </div>
        </form>
        </div>
{% endblock infos%}
