{% 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">local_shipping</i> {{ layoutTitle }}
        </h3>

        <div class="card-body card-block row">
          <div class="form-wrapper card-text">
            {% block form_fields %}
              {{ form_errors(form) }}
              {{ form_rest(form) }}
            {% endblock %}
          </div>
        </div>

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

          <button class="btn btn-primary float-right">{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
        </div>
        {{ form_end(form) }}
      </div>

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

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

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