{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Połączone konta" %}{% endblock %}

{% block body %}
  <div class="white-box">

    <h1>{% trans "Połączone konta" %}</h1>

{% if form.accounts %}
<p>{% blocktrans %}Możesz się logować, używając jednego z tych zewnętrznych kont:{% endblocktrans %}</p>


<form method="post">
{% csrf_token %}

{% if form.non_field_errors %}
<div>{{form.non_field_errors}}</div>
{% endif %}

{% for base_account in form.accounts %}
{% with base_account.get_provider_account as account %}
<label for="id_account_{{base_account.id}}">
<input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/>
<span class="socialaccount_provider {{base_account.provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span>
<small>{{account}}</small>
</label><br><br>
{% endwith %}
{% endfor %}

<button type="submit">{% trans "Usuń" %}</button>


</form>

{% else %}
<p>{% trans "Nie masz podłączonych żadnych zewnętrznych kont." %}</p>
{% endif %}

{% if USE_OPENID %}
<h2>{% trans 'Podłącz zewnętrzne konto' %}</h2>

<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
</ul>

{% include "socialaccount/snippets/login_extra.html" %}
{% endif %}
</div>
{% endblock %}
