{% extends '@Modules/glspoland/views/templates/admin/config/config_form.html.twig' %}

{% block form_fields %}
  {{ form_row(form.sandboxEnabled) }}

  {{ form_errors(form.prodCredentials) }}
  {{ form_widget(form.prodCredentials) }}

  {{ form_errors(form.testCredentials) }}
  {{ form_widget(form.testCredentials) }}

  {{ form_rest(form) }}
  {{ form_errors(form) }}
{% endblock %}

{% block form_actions %}
  <button type="submit" name="test_connection" value="1" class="btn btn-outline-primary float-right ml-2"{% if not can_update %} disabled{% endif %}>
    {{ 'Test connection'|trans({}, 'Modules.Glspoland.Configuration') }}
  </button>
  <button class="btn btn-primary float-right"{% if not can_update %} disabled{% endif %}>{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
{% endblock %}

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

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