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

Better management of connected identities

Issue #170
parent 7b8ad7c6
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<ul> <ul>
{% for assoc in backends.associated %} {% for assoc in backends.associated %}
<li> <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> </li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -107,5 +107,6 @@ ...@@ -107,5 +107,6 @@
<input type="submit" value="{% trans "Save" %}" class="button" /> <input type="submit" value="{% trans "Save" %}" class="button" />
</form> </form>
<form method="post" action="" id="disconnect-form">{% csrf_token %}</form>
{% endblock %} {% endblock %}
...@@ -382,6 +382,13 @@ $(function () { ...@@ -382,6 +382,13 @@ $(function () {
$('.code-example').focus(function () { $('.code-example').focus(function () {
$(this).select(); $(this).select();
}); });
$('a.disconnect').click(function (e) {
e.preventDefault();
$('form#disconnect-form')
.attr('action', $(this).attr('href'))
.submit();
});
$(document).tooltip({ $(document).tooltip({
content: function () { content: function () {
var element = $(this); 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