Mercurial > agora-palash
annotate 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 |
rev | line source |
---|---|
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
1 {% extends "base.djhtml" %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
2 |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
3 {% block breadcrubs %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
4 Viewing your profile |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
5 {% endblock %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
6 |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
7 {% block content %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
8 <h1>Edit your account settings ({{ user }})</h1> |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
9 <p class="hint"> |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
10 You can provide some extra optional information about yourself. We |
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
11 recommend that you provide us with a real name. If you do, it will be |
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
12 displayed next to all of your contributions instead of your Agora |
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
13 username. |
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
14 </p> |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
15 <form method="post"> |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
16 {% if form.non_field_errors %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
17 {{ form.non_field_errors }} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
18 {% endif %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
19 {% csrf_token %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
20 |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
21 {% for field in user_form %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
22 {% include "field.djhtml" %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
23 {% endfor %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
24 |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
25 {% for field in profile_form %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
26 {% include "field.djhtml" %} |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
27 {% endfor %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
28 |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
29 <div class="center-align"> |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
30 <button type="submit" class="button large">Submit</button> |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
31 <button type="reset" class="button large">Reset</button> |
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
32 </div> |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
33 </form> |
130
5ab229c9d348
Add back ability to edit account settings
dellsystem <ilostwaldo@gmail.com>
parents:
37
diff
changeset
|
34 {% endblock %} |