{% load i18n %} {% comment %} Connect is a button, not a nested form: it posts the surrounding settings form to its own formaction, which is how it keeps everything typed but not yet saved. Disconnect is a link to a confirmation page instead — it stops issuance. On an event's page the connection may be the organizer's (connection_inherited): connecting here then gives the event one of its own, and there is nothing of the event's to disconnect. {% endcomment %}
{% if provider.connection_state == "connected" %}

{% if provider.connection_inherited %} {% trans "Connected through the organizer's settings" %} {% else %} {% trans "Connected" %} {% endif %}

{% elif provider.connection_state == "expired" %}
{% if provider.connection_inherited %} {% blocktrans trimmed with url=provider.organizer_settings_url %} The organizer's connection to Moloni has expired. Invoices can't be issued until it is connected again in the organizer's invoicing settings. {% endblocktrans %} {% else %} {% blocktrans trimmed %} The connection to Moloni has expired. Invoices can't be issued until you connect again. {% endblocktrans %} {% endif %}
{% else %}

{% trans "Not connected" %}

{% endif %} {% if provider.connection_state and not provider.connection_inherited %} {% trans "Disconnect" %} {% endif %} {% comment %} The address on its own line so the copy button sits right beside it (wired up by settings.js: the CSP blocks inline handlers). {% endcomment %} {{ provider.redirect_uri }}
{% blocktrans trimmed %} Register this address as the redirect URI of your Moloni developer app. Once connected, no username or password is needed. Whatever you have typed on this page is saved when you connect. {% endblocktrans %}