{% extends "accounting/layout.html" %}
{% load bootstrap3 introspection_filters %}

{% block head %}
    {{ block.super }}
    {{ form.media }}
{% endblock %}

{% block content %}
    {% if object.pk %}
        <h1 class="page-header">Edit a {{ form|get_form_model_verbose_name }}</h1>
    {% else %}
        <h1 class="page-header">Create a {{ form|get_form_model_verbose_name }}</h1>
    {% endif %}

    <form action="." method="post" class="form">
        {% csrf_token %}

        {% include "accounting/_partials/form_fields.html" with form=form %}

        {% buttons %}
            <button type="submit" class="btn btn-success">
                {% if object.pk %}
                    {% bootstrap_icon "hand-right" %} Save changes
                {% else %}
                    {% bootstrap_icon "thumbs-up" %} Send creation
                {% endif %}
            </button>
        {% endbuttons %}
    </form>
{% endblock content %}
