| 1 |
{% extends "django_mailman3/profile/base.html" %} |
| 2 |
|
| 3 |
{% load i18n %} |
| 4 |
{% load static %} |
| 5 |
|
| 6 |
{% block user_profile_content %} |
| 7 |
|
| 8 |
{% if form.accounts %} |
| 9 |
<p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p> |
| 10 |
|
| 11 |
|
| 12 |
<form method="post" action="{% url 'socialaccount_connections' %}"> |
| 13 |
{% csrf_token %} |
| 14 |
|
| 15 |
<fieldset> |
| 16 |
{% if form.non_field_errors %} |
| 17 |
<div id="errorMsg">{{ form.non_field_errors }}</div> |
| 18 |
{% endif %} |
| 19 |
|
| 20 |
{% for base_account in form.accounts %} |
| 21 |
{% with base_account.get_provider_account as account %} |
| 22 |
<div class="radio"> |
| 23 |
<label for="id_account_{{ base_account.id }}"> |
| 24 |
<input id="id_account_{{ base_account.id }}" type="radio" name="account" value="{{ base_account.id }}"/> |
| 25 |
<img alt="" src="{% static 'django-mailman3/img/login/' %}{{ account.get_brand.id }}.png" /> |
| 26 |
<span class="socialaccount_provider {{ base_account.provider }} {{ account.get_brand.id }}">{{account.get_brand.name}}</span>: |
| 27 |
{{ account }} |
| 28 |
</label> |
| 29 |
</div> |
| 30 |
{% endwith %} |
| 31 |
{% endfor %} |
| 32 |
|
| 33 |
<div> |
| 34 |
<button type="submit" class="btn btn-primary">{% trans 'Remove' %}</button> |
| 35 |
</div> |
| 36 |
|
| 37 |
</fieldset> |
| 38 |
|
| 39 |
</form> |
| 40 |
|
| 41 |
{% else %} |
| 42 |
<p>{% trans 'You currently have no social network accounts connected to this account.' %}</p> |
| 43 |
{% endif %} |
| 44 |
|
| 45 |
<h3>{% trans 'Add a 3rd Party Account' %}</h3> |
| 46 |
|
| 47 |
<ul class="socialaccount_providers list-inline"> |
| 48 |
{% include "socialaccount/snippets/provider_list.html" with process="connect" %} |
| 49 |
</ul> |
| 50 |
|
| 51 |
{% include "socialaccount/snippets/login_extra.html" %} |
| 52 |
|
| 53 |
{% endblock %} |