{% import "macros.html" as macros %}
{% if unique_enabled_login_provider %}
  <form method="post" action="{{ settings.LOGIN_URL }}">
    {{ macros.csrf_middleware_token(csrf_token) }}
    {{ login_form.next }}
    {{ login_form.persona_assertion }}
    <input 
      type='hidden'
      name='login_provider_name'
      value='{{ unique_enabled_login_provider.name }}'
    />
    <input
      name="{{ unique_enabled_login_provider.name }}"
      type="submit"
      class="{{ unique_enabled_login_provider.type }}"
      value="{% trans login_name=unique_enabled_login_provider.display_name %}Sign in via {{ login_name }}{% endtrans %}"
    />
  </form>
{% else %}
  {% set next_url=request.path|clean_login_url|escape %}
  <a class="login-link"
     href="{{ settings.LOGIN_URL }}?next={{ encode_jwt({'next_url': next_url}) }}"
  >
    {% trans %}Sign in{% endtrans %}
  </a>
{% endif %}
