{% import "_macros.html" as m with context %}
{% if errors.form %}{{ m.alert(errors.form, 'danger', class='mb-4') }}{% endif %}
{% for field in fields %} {% set _width = field_width(field) %}
{% include "form/_field.html" %}
{% endfor %}
{{ m.button('Cancel', 'ghost', href=cancel_url) }}
{% if view.can_create %}{{ m.button('Save and add another', 'secondary', type='submit', name='_then', value='another') }}{% endif %} {{ m.button('Save', 'primary', type='submit') }}