{% extends "wagtailadmin/base.html" %}
{% load wagtailimages_tags %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=image.title %}Editing image {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block extra_css %}
    {% include "wagtailadmin/shared/tag_field_css.html" %}
{% endblock %}

{% block extra_js %}
    {% include "wagtailadmin/shared/tag_field_js.html" %}
{% endblock %}

{% block content %}
    {% trans "Editing" as editing_str %}
    {% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=image.title icon="image" %}
    
    <div class="row row-flush nice-padding">
       
        <div class="col7">
            <form action="{% url 'wagtailimages_edit_image' image.id %}" method="POST" enctype="multipart/form-data">
                {% csrf_token %}
                <ul class="fields">
                    {% for field in form %}

                        {% if field.name == 'file' %}
                            {% include "wagtailimages/images/_file_field.html" %}
                        {% else %}
                            {% include "wagtailadmin/shared/field_as_li.html" %}
                        {% endif %}

                    {% endfor %}
                    <li><input type="submit" value="{% trans 'Save' %}" /><a href="{% url 'wagtailimages_delete_image' image.id %}" class="button button-secondary no">{% trans "Delete image" %}</a></li>
                </ul>
            </form>
            
        </div>
        <div class="col5">
            {% image image max-800x600 %}
        </div>
    </div>
{% endblock %}
