{% extends ajax-suffix ? "@gantry-admin/partials/ajax.html.twig" : "@gantry-admin/partials/base.html.twig" %}

{% block gantry %}
<form method="post" action="{{ gantry.route('menu/edit', id, path, 'validate') }}">
    <div class="card settings-block">
        <h4>
            <span data-title-editable="{{ data.title }}" class="title">{{ data.title }}</span> <i class="fa fa-pencil font-small" data-title-edit></i>
            {% if blueprints.form.fields.enabled %}
            {% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'name': 'enabled', 'field': blueprints.form.fields.enabled, 'value': data.enabled} %}
            {% endif %}
            <span class="g-menuitem-path font-small">/{{ path }}</span>
        </h4>
        <div class="inner-params">
            {% include 'forms/fields.html.twig' with {'skip': ['enabled', 'title', data.level > 1 ? 'dropdown' : '-noitem-'] } %}
        </div>
    </div>
    <div class="g-modal-actions">
        {#<a class="button float-left">{{ 'GANTRY5_PLATFORM_DEFAULTS'|trans }}</a>#}
        <button class="button button-primary" type="submit">{{ 'GANTRY5_PLATFORM_APPLY'|trans }}</button>
        <button class="button button-primary" data-apply-and-save>{{ 'GANTRY5_PLATFORM_APPLY_SAVE'|trans }}</button>
        <a class="button g5-dialog-close">{{ 'GANTRY5_PLATFORM_CANCEL'|trans }}</a>
    </div>
</form>
{% endblock %}
