{% extends 'Admin/layout.html.twig' %}
{%- import 'Admin/Form/macros.html.twig' as m -%}

{% block body %}
    <header>
        <ul class="btns">
            <li class="btns-back">
                {{ m.step_back() }}
            </li>
            <li>
                <button class="btn btn-save" form="form-actuadd">
                    {{ 'action.save'|trans({}, 'action') }}
                </button>
            </li>
        </ul>
        
        <h1>
            {%- if form.vars.value.title is not null %}Modifier lʼ{% else %}Ajouter un {% endif %}article
            {%- if form.vars.value.title is not null %} <em>{{ form.vars.value.title }}</em>{% endif -%}
        </h1>
    </header>

    {{ form(form, {'attr': {'id': 'form-actuadd'}}) }}

    <ul class="btns">
        <li>
            <button class="btn btn-save" form="form-actuadd">
                {{ 'action.save'|trans({}, 'action') }}
            </button>
        </li>
    </ul>
{% endblock %}
