2018-01-02 17:06:12 +01:00
|
|
|
{% extends "allauth_ens/base.html" %}
|
2017-08-03 12:40:52 +02:00
|
|
|
{% load i18n %}
|
2017-09-16 02:32:42 +02:00
|
|
|
{% load socialaccount allauth_ens_social %}
|
2017-08-03 12:40:52 +02:00
|
|
|
|
2017-09-16 02:32:42 +02:00
|
|
|
{% block title %}{% trans "Account Connections" %}{% endblock %}
|
|
|
|
{% block header-title %}{% trans "Account Connections" %}{% endblock %}
|
2017-08-03 12:40:52 +02:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<p>
|
|
|
|
{% if form.accounts %}
|
|
|
|
{% blocktrans %}
|
|
|
|
You can sign in to your account using any of the following third party accounts:
|
|
|
|
{% endblocktrans %}
|
|
|
|
{% else %}
|
|
|
|
{% blocktrans %}
|
|
|
|
You currently have no third party accounts connected to this account.
|
|
|
|
{% endblocktrans %}
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
2018-01-02 17:06:12 +01:00
|
|
|
<ul class="connections-providers-list">
|
2017-09-16 02:32:42 +02:00
|
|
|
{% get_accounts_by_providers user as accounts_by_providers %}
|
2017-08-03 12:40:52 +02:00
|
|
|
|
2017-09-16 02:32:42 +02:00
|
|
|
{% for provider, accounts in accounts_by_providers.items %}
|
2017-08-03 12:40:52 +02:00
|
|
|
|
2018-01-02 17:06:12 +01:00
|
|
|
<li>
|
|
|
|
<div class="heading">
|
|
|
|
<a class="connect" href="{% provider_login_url provider.id process="connect" scope=scope auth_params=auth_params %}">
|
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
</a>
|
|
|
|
{{ provider.name }}
|
|
|
|
</div>
|
2017-08-03 12:40:52 +02:00
|
|
|
|
2017-09-16 02:32:42 +02:00
|
|
|
{% if accounts %}
|
|
|
|
|
2018-01-02 17:06:12 +01:00
|
|
|
<ul class="connections-list">
|
2017-09-16 02:32:42 +02:00
|
|
|
{% for account in accounts %}
|
2017-08-03 12:40:52 +02:00
|
|
|
|
|
|
|
<li>
|
2018-01-02 17:06:12 +01:00
|
|
|
<div class="delete">
|
2017-09-16 02:32:42 +02:00
|
|
|
<form action="{% url "socialaccount_connections" %}" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="account" value="{{ account.id }}">
|
2018-01-02 17:06:12 +01:00
|
|
|
<button type="submit" class="link">
|
|
|
|
<i class="fa fa-remove"></i>
|
|
|
|
</button>
|
2017-09-16 02:32:42 +02:00
|
|
|
</form>
|
2018-01-02 17:06:12 +01:00
|
|
|
</div>
|
|
|
|
<i class="fa fa-user"></i>
|
|
|
|
{% with profile_urlaccount.get_profile_url as profile_url %}
|
|
|
|
{% firstof account.extra_data.name account.extra_data.username account.uid as account_label %}
|
|
|
|
{% if profile_url %}
|
|
|
|
<a href="{{ get_profile_url }}" target="blank">
|
2017-09-16 02:32:42 +02:00
|
|
|
{{ account_label }}
|
2018-01-02 17:06:12 +01:00
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
{{ account_label }}
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2017-08-03 12:40:52 +02:00
|
|
|
</li>
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{% endblock %}
|