{% extends '@PrestaShop/Admin/layout.html.twig' %}

{% form_theme form '@Modules/glspoland/views/templates/admin/form_theme.html.twig' %}

{% block stylesheets %}
  {{ parent() }}

  <link rel="stylesheet" href="{{ asset('css/admin/navigation.css', 'GlsPoland') }}">
{% endblock %}

{% block content %}
  {% if nav_items is defined %}
    {% include '@Modules/glspoland/views/templates/admin/config/nav.html.twig' with { nav_items: nav_items, display: 'content' } %}
  {% endif %}

  <div class="row justify-content-center">
    <div class="col">

      <div class="card">
        {{ form_start(form) }}
        <h3 class="card-header">
          <i class="material-icons">settings</i> {{ layoutTitle }}
        </h3>

        <div class="card-body card-block row">
          <div class="form-wrapper card-text">
            {% block form_fields %}
              {% if form.vars.compound is same as(true) %}
                {{ form_errors(form) }}
                {{ form_rest(form) }}
              {% else %}
                {{ form_row(form) }}
              {% endif %}
            {% endblock %}
          </div>
        </div>

        <div class="card-footer clearfix">
          <a href="{{ path('admin_module_manage') }}" class="btn btn-outline-secondary">{{ 'Back'|trans({}, 'Admin.Global') }}</a>

          {% block form_actions %}
            <button class="btn btn-primary float-right"{% if not can_update %} disabled{% endif %}>{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
          {% endblock %}
        </div>
        {{ form_end(form) }}
      </div>

    </div>
  </div>
{% endblock %}

{% block javascripts %}
  {{ parent() }}

  <script src="{{ asset('js/admin/config/navigation.js', 'GlsPoland') }}"></script>
{% endblock %}
