| 1 |
{% extends "socialaccount/base_manage.html" %} |
| 2 |
{% load i18n %} |
| 3 |
{% load allauth %} |
| 4 |
{% block head_title %} |
| 5 |
{% trans "Account Connections" %} |
| 6 |
{% endblock head_title %} |
| 7 |
{% block content %} |
| 8 |
{% element h1 %} |
| 9 |
{% trans "Account Connections" %} |
| 10 |
{% endelement %} |
| 11 |
{% if form.accounts %} |
| 12 |
{% element p %} |
| 13 |
{% blocktrans %}You can sign in to your account using any of the following third-party accounts:{% endblocktrans %} |
| 14 |
{% endelement %} |
| 15 |
{% url 'socialaccount_connections' as action_url %} |
| 16 |
{% element form form=form method="post" action=action_url %} |
| 17 |
{% slot body %} |
| 18 |
{% csrf_token %} |
| 19 |
{% for acc in form.fields.account.choices %} |
| 20 |
{% with account=acc.0.instance.get_provider_account %} |
| 21 |
{% setvar radio_id %} |
| 22 |
id_account_{{ account.account.pk }} |
| 23 |
{% endsetvar %} |
| 24 |
{% setvar tags %} |
| 25 |
socialaccount,{{ account.account.provider }} |
| 26 |
{% endsetvar %} |
| 27 |
{% element field id=radio_id type="radio" name="account" value=account.account.pk %} |
| 28 |
{% slot label %} |
| 29 |
{{ account }} |
| 30 |
{% element badge tags=tags %} |
| 31 |
{{ account.get_brand.name }} |
| 32 |
{% endelement %} |
| 33 |
{% endslot %} |
| 34 |
{% endelement %} |
| 35 |
{% endwith %} |
| 36 |
{% endfor %} |
| 37 |
{% endslot %} |
| 38 |
{% slot actions %} |
| 39 |
{% element button tags="delete,danger" type="submit" %} |
| 40 |
{% trans 'Remove' %} |
| 41 |
{% endelement %} |
| 42 |
{% endslot %} |
| 43 |
{% endelement %} |
| 44 |
{% else %} |
| 45 |
{% element p %} |
| 46 |
{% trans 'You currently have no third-party accounts connected to this account.' %} |
| 47 |
{% endelement %} |
| 48 |
{% endif %} |
| 49 |
{% element h2 %} |
| 50 |
{% trans 'Add a Third-Party Account' %} |
| 51 |
{% endelement %} |
| 52 |
{% include "socialaccount/snippets/provider_list.html" with process="connect" %} |
| 53 |
{% include "socialaccount/snippets/login_extra.html" %} |
| 54 |
{% endblock content %} |