2025.10.06-03:08:05
This commit is contained in:
55
templates/socialaccount/connections.html
Normal file
55
templates/socialaccount/connections.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% extends 'base.html' %}
|
||||
{# {% extends "socialaccount/base_manage.html" %} #}
|
||||
{% load i18n %}
|
||||
{% load allauth %}
|
||||
{% block head_title %}
|
||||
{% trans "Account Connections" %}
|
||||
{% endblock head_title %}
|
||||
{% block content %}
|
||||
{% element h1 %}
|
||||
{% trans "Account Connections" %}
|
||||
{% endelement %}
|
||||
{% if form.accounts %}
|
||||
{% element p %}
|
||||
{% blocktrans %}You can sign in to your account using any of the following third-party accounts:{% endblocktrans %}
|
||||
{% endelement %}
|
||||
{% url 'socialaccount_connections' as action_url %}
|
||||
{% element form form=form method="post" action=action_url %}
|
||||
{% slot body %}
|
||||
{% csrf_token %}
|
||||
{% for acc in form.fields.account.choices %}
|
||||
{% with account=acc.0.instance.get_provider_account %}
|
||||
{% setvar radio_id %}
|
||||
id_account_{{ account.account.pk }}
|
||||
{% endsetvar %}
|
||||
{% setvar tags %}
|
||||
socialaccount,{{ account.account.provider }}
|
||||
{% endsetvar %}
|
||||
{% element field id=radio_id type="radio" name="account" value=account.account.pk %}
|
||||
{% slot label %}
|
||||
{{ account }}
|
||||
{% element badge tags=tags %}
|
||||
{{ account.get_brand.name }}
|
||||
{% endelement %}
|
||||
{% endslot %}
|
||||
{% endelement %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endslot %}
|
||||
{% slot actions %}
|
||||
{% element button tags="delete,danger" class="btn btn-danger" type="submit" %}
|
||||
{% trans 'Remove' %}
|
||||
{% endelement %}
|
||||
{% endslot %}
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% element p %}
|
||||
{% trans 'You currently have no third-party accounts connected to this account.' %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
{% element h2 %}
|
||||
{% trans 'Add a Third-Party Account' %}
|
||||
{% endelement %}
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user