{% 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" tabindex="0" aria-label="{{ 'GANTRY5_PLATFORM_EDIT_TITLE'|trans(data.title) }}" data-title-edit=""></i>
            {% if blueprints.fields['.enabled'] %}
            {% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'name': 'enabled', 'field': blueprints.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">
        {% if gantry.authorize('menu.edit', id) %}
        {#<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>
        {% endif %}
        <button class="button g5-dialog-close">{{ 'GANTRY5_PLATFORM_CANCEL'|trans }}</button>
    </div>
</form>
{% endblock %}
