view templates/profile/edit-user.djhtml @ 130:5ab229c9d348

Add back ability to edit account settings * Account/profile editing is now done with a ModelForm, instead of processing the data manually. Help text and verbose names have been moved to the Profile model and to the UserForm (in the latter case, it's because we can't edit the User model directly). * The profile page now shows pygments style information and sections of the profile that are not filled are now hidden. * Some parts of apps/profiles/views.py have been rewritten (the getprofile() method has been removed, as it's no longer necessary, and the editprofile() view was rewritten in accordance with the switch to using ModelForms). * The styling for forms has been modified slightly.
author dellsystem <ilostwaldo@gmail.com>
date Sat, 22 Sep 2012 11:18:23 -0400
parents ba2dad0d7f2a
children
line wrap: on
line source

{% extends "base.djhtml" %}

{% block breadcrubs %}
Viewing your profile
{% endblock %}

{% block content %}
<h1>Edit your account settings ({{ user }})</h1>
<p class="hint">
You can provide some extra optional information about yourself. We
recommend that you provide us with a real name. If you do, it will be
displayed next to all of your contributions instead of your Agora
username.
</p>
<form method="post">
    {% if form.non_field_errors %}
    {{ form.non_field_errors }}
    {% endif %}
    {% csrf_token %}

    {% for field in user_form %}
    {% include "field.djhtml" %}
    {% endfor %}

    {% for field in profile_form %}
    {% include "field.djhtml" %}
    {% endfor %}

    <div class="center-align">
        <button type="submit" class="button large">Submit</button>
        <button type="reset" class="button large">Reset</button>
    </div>
</form>
{% endblock %}