{% 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, 'validate') }}">
    <div class="card settings-block">
        <h4>
            <span data-title-editable="{{ data.settings.title }}" class="title">
                {{ data.settings.title }}
            </span>
            <i class="fa fa-pencil fa-pencil-alt font-small" aria-hidden="true" tabindex="0" aria-label="{{ 'GANTRY5_PLATFORM_EDIT_TITLE'|trans(data.settings.title) }}" 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 %}
        </h4>
        <div class="inner-params">
            {% include 'forms/fields.html.twig' with {'blueprints': blueprints.form, 'data':  data, 'skip': ['enabled', 'settings.title']} %}
        </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 %}
