-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.html
57 lines (51 loc) · 2.35 KB
/
settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% extends 'base.html' %}
{% block content %}
<div class="container" style="margin-top: 130px;">
<h2>Settings</h2>
<h3>GitHub</h3>
{% if github_login %}
<p>Connected as <a href="https://github.com/{{ github_login.extra_data.login }}/" target="_blank">{{ github_login.extra_data.login }}</a></p>
{% if can_disconnect %}
<form method="post" action="{% url 'social:disconnect' 'github' %}">
{% csrf_token %}
<button type="submit">Disconnect from GitHub</button>
</form>
{% else %}
<button type="button" disabled>Disconnect from GitHub</button>
<p style="color: red">You must <a href="{% url 'password' %}">define a password</a> for your account before disconnecting from Github.</p>
{% endif %}
{% else %}
<a href="{% url 'social:begin' 'github' %}">Connect to GitHub</a>
{% endif %}
<h3>Linkedin</h3>
{% if linkedin_login %}
<p>Connected as <a href="https://linkedin.com/{{ linkedin_login.extra_data.in.id }}/" target="_blank">@{{ twitter_login.extra_data.access_token.screen_name }}</a></p>
{% if can_disconnect %}
<form method="post" action="{% url 'social:disconnect' 'linkedin' %}">
{% csrf_token %}
<button type="submit">Disconnect from Linkedin</button>
</form>
{% else %}
<button type="button" disabled>Disconnect from Linkedin</button>
<p style="color: red">You must <a href="{% url 'password' %}">define a password</a> for your account before disconnecting from Linkedin.</p>
{% endif %}
{% else %}
<a href="{% url 'social:begin' 'linkedin' %}">Connect to Linkedin</a>
{% endif %}
<h3>Facebook</h3>
{% if facebook_login %}
<p>Connected as <a href="https://facebook.com/{{ facebook_login.extra_data.id }}/" target="_blank">{{ facebook_login.extra_data.id }}</a></p>
{% if can_disconnect %}
<form method="post" action="{% url 'social:disconnect' 'facebook' %}">
{% csrf_token %}
<button type="submit">Disconnect from Facebook</button>
</form>
{% else %}
<button type="button" disabled>Disconnect from Facebook</button>
<p style="color: red">You must <a href="{% url 'password' %}">define a password</a> for your account before disconnecting from Facebook.</p>
{% endif %}
{% else %}
<a href="{% url 'social:begin' 'facebook' %}">Connect to Facebook</a>
{% endif %}
</div>
{% endblock %}