Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1a8a68352e
Fetching contributors…

Cannot retrieve contributors at this time

file 52 lines (46 sloc) 2.188 kb
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
{% extends "base.html" %}
{% load i18n %}
{% load socialprofile_tags %}
{% load url from future %}

{% block headtitle %}{% trans "Profile for " %}{{ user.username }}{% endblock %}

{% block header %}
    <header data-role="header" data-theme="b" data-position="fixed">
        <a href="{% url 'sp_profile_view_page' %}?returnTo={{ form.returnTo.value }}"
           data-role="button">{% trans "Cancel" %}</a>

        <h1 class="ui-title">{% trans "Profile" %}</h1>
        <a href="#" data-role="button" onclick="$('#sp-profile-form').submit();">{% trans "Done" %}</a>
    </header>
{% endblock %}

{% block content %}
    <section title="profile" data-role="content">
        {% if user.social_profile.image_url %}
            <img src="{{ user.social_profile.image_url }}"/>
        {% endif %}
        <form action="{% url 'sp_profile_edit_page' %}" method="post" id="sp-profile-form" data-ajax="false">
            {% csrf_token %}
            <ul>
                {{ form.as_ul }}
            </ul>
        </form>
        <h3 style="margin-left:10px;">{% trans "Social Connections" %}</h3>
        {% if user.social_auth.all.count == 1 %}
            {% with only_connection=user.social_auth.all|first %}
                <p style="margin-left:20px;"><em>{{ only_connection.provider|social_provider_name }}
                    {% trans "is your only means of authentication, it cannot be removed." %}</em></p>
            {% endwith %}
        {% else %}
            <ul>
                {% for user_social_auth in user.social_auth.all %}
                    <a href="{% url 'socialauth_disconnect' user_social_auth.provider %}"
                       data-role="button">{% trans "Disconnect" %} {{ user_social_auth.provider|social_provider_name }}</a>
                {% endfor %}
                <li><a href="{% url 'sp_select_page' %}" data-theme="a" data-rel="dialog"
                       data-role="button">{% trans "Add Social Connection" %}</a></li>
            </ul>

        {% endif %}

        <br>
        <br>
        <br>
        <a href="{% url 'sp_delete_page' %}" data-role="button" data-theme="e">{% trans "Delete Account" %}</a>
    </section>
{% endblock %}
Something went wrong with that request. Please try again.