Django 1.8
[cas.git] / src / accounts / templates / account / profile.html
1 {% extends "base.html" %}
2 {% load gravatar i18n %}
3
4 {% block content %}
5         <aside class="user_avatar">
6                 <img src="{% gravatar_url request.user.email 120 %}"
7             alt="Gravatar"
8             title="{% trans 'Change at Gravatar.com' %}">
9                 <p><a href="{% url 'cas_logout' %}">{% trans "Logout" %}</a></p>
10         </aside>
11
12         <div id="details">
13                 {% if messages %}
14             <section id="messages">
15                 {% for message in messages %}<p>{{ message }}</p>{% endfor %}
16             </section>
17         {% endif %}
18
19     <h2>{% trans "Your profile" %}</h2>
20     <form method="post" action="/accounts/change_profile">
21     {% csrf_token %}
22         <table>
23                 {{ basic_form.as_table }}
24                         <tr><td colspan="2"><button type="submit">{% trans "Change profile" %}</button></td></tr>
25                 </table>
26         </form>
27
28         <h2>{% trans "Password change" %}</h2>
29         <form method="post" action="/accounts/change_password">
30     {% csrf_token %}
31         <table>
32                 {{ pass_form.as_table }}
33                 <tr><td colspan="2"><button type="submit">{% trans "Change password" %}</button></td></tr>
34                 </table>
35         </form>
36         </div>
37
38     {% if services %}
39         <section id="services-list">
40         <h1>{% trans "Sign in to:" %}</h1>
41         {% for service in services %}
42             <a href="{{ service.url }}" title="{{ service.name }}">
43                 <img src="{{ service.image.url }}" alt="{{ service.name }}">
44             </a>
45         {% endfor %}
46         </section>
47     {% endif %}
48 {% endblock %}