{% load trans blocktrans from i18n %} {% load get_github_providers get_providers from ext_theme_tags %} {% comment %} ``get_providers`` filters out providers marked as hidden in our settings file. ``get_github_providers`` is just used for the modal and can be removed eventually. {% endcomment %} {% get_providers process=process as providers %} {% get_github_providers process=process as providers_github %} {% comment %} If both GitHub providers are configured, and they are not ``hidden=True`` or ``hidden_on_{process}=True`` in settings, we'll show these providers in a modal. If ``allowed_providers`` is set, we skip the modal and just show the allowed providers in the list below. {% endcomment %} {% get_providers process=process as providers %} {% if providers_github|length == 2 and not allowed_providers %} {% trans "GitHub" as provider_name %}
  • {% blocktrans trimmed with provider_name=provider_name verbiage=verbiage|default:'Connect to' %} {{ verbiage }} {{ provider_name }} {% endblocktrans %}
  • {% endif %} {# This is the basic list but with sorting now. If there is a modal above, we skip the GitHub providers here #} {% for provider in providers %} {% if providers_github|length == 2 and "github" in provider.id and not allowed_providers %} {% comment %} TODO remove this after we are mostly using GHA and don't need a modal Skip any provider that is in the modal above if the modal is in use. This adjusts for when one provider is shown on connect but the modal is used on login. {% endcomment %} {% else %}
  • {% include "socialaccount/snippets/provider_list_item.html" with process=process verbiage=text_log_in provider=provider %}
  • {% endif %} {% endfor %}