{% macro widget_prototype(form) %}

{{ 'admin:phrasea-service-setting:tab:expose:: New expose interconnection name' | trans }}

{{ form_row(form.expose_name) }}
{{ form_widget(form.activate_expose) }} {{ form_label(form.activate_expose) }}
{{ form_row(form.connection_kind) }}
{{ form_label(form.auth_provider_name) }} {{ form_widget(form.auth_provider_name) }}
{{ form_widget(form.verify_ssl) }} {{ form_label(form.verify_ssl) }}
{{ form_row(form.expose_front_uri) }}
{{ form_row(form.expose_base_uri) }}
{{ form_row(form.expose_client_secret) }}
{{ form_row(form.expose_client_id) }}
{{ form_label(form.oauth_token_uri) }}
expose v2 : https://api-auth.phrasea.local/oauth/v2/token
expose v3 : https://api-expose.ps-test.phrasea.fr/oauth/v2/token
{{ form_widget(form.oauth_token_uri) }}
{{ form_row(form.auth_client_secret) }}
{{ form_row(form.auth_client_id) }}
{% endmacro %}

{{ 'admin:phrasea-service-setting:tab:expose:: Expose setting' | trans }}

{{ form_start(form, {'action': path('ps_admin_expose')}) }}
{{ form_widget(form.activated) }} {{ form_label(form.activated) }}
{% for expose_connection in form.exposes %} {{ _self.widget_prototype(expose_connection) }} {% endfor %}
{{ form_end(form) }}