{% extends "admin/change_form.html" %}

{% block field_sets %}
<fieldset class="module aligned">
    {% for field in form %}
        <div class="form-row {% if field.errors %} errors{% endif %} field-{{ field.name }}">
                <div>
                    {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
                    {% if field.is_checkbox %}
                        {{ field }}{{ field.label_tag }}
                    {% else %}
                        {{ field.label_tag }}
                        {{ field }}
                    {% endif %}
                    {% if field.help_text %}
                        <p class="help">{{ field.help_text|safe }}</p>
                    {% endif %}
                </div>
        </div>
    {% endfor %}
</fieldset>
{% endblock %}

{% if save_on_top %}
{% block submit_buttons_top %}
{% include "admin/submit_line.html" with show_delete_link=has_delete_permission show_save=True show_save_and_continue=False opts=opts original=original only  %}
{% endblock %}
{% endif %}

{% block submit_buttons_bottom %}
{% include "admin/submit_line.html" with show_delete_link=has_delete_permission show_save=True show_save_and_continue=False opts=opts original=original only %}
{% endblock %}
