Commit fa2dbe7f authored by Michal Čihař's avatar Michal Čihař

Better management of connected identities

Issue #170
parent 7b8ad7c6
......@@ -54,7 +54,7 @@
<ul>
{% for assoc in backends.associated %}
<li>
{{ assoc.provider }} <form action="{% url 'social:disconnect_individual' assoc.provider assoc.id %}" method="post">{% csrf_token %}<input type="submit" value="Disconnect" /></form>
{{ assoc.provider }} (<a href="{% url 'social:disconnect_individual' assoc.provider assoc.id %}" class="disconnect">Disconnect</a>)
</li>
{% endfor %}
</ul>
......@@ -107,5 +107,6 @@
<input type="submit" value="{% trans "Save" %}" class="button" />
</form>
<form method="post" action="" id="disconnect-form">{% csrf_token %}</form>
{% endblock %}
......@@ -382,6 +382,13 @@ $(function () {
$('.code-example').focus(function () {
$(this).select();
});
$('a.disconnect').click(function (e) {
e.preventDefault();
$('form#disconnect-form')
.attr('action', $(this).attr('href'))
.submit();
});
$(document).tooltip({
content: function () {
var element = $(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment