annotate gpp/templates/bio/avatar.html @ 507:8631d32e6b16

Some users are still having problems with the pop-up login. I think they are actually getting 403s because of the CSRF protection. So I have modified the base template to always have a javascript variable called csrf_token available when they aren't logged in. The ajax_login.js script was then modified to send this value with the ajax post. Fingers crossed.
author Brian Neal <bgneal@gmail.com>
date Sun, 04 Dec 2011 03:05:21 +0000
parents 3c48a555298d
children
rev   line source
gremmie@1 1 {% extends 'bio/base.html' %}
bgneal@310 2 {% load url from future %}
bgneal@492 3 {% load bio_tags %}
gremmie@1 4 {% block title %}Change My Avatar{% endblock %}
gremmie@1 5 {% block content %}
gremmie@1 6 <h2>Change My Avatar</h2>
gremmie@1 7 <p>This is your current avatar:</p>
bgneal@492 8 <p>{% avatar user 0 %}</p>
gremmie@1 9 <p>
gremmie@1 10 To change your avatar, upload a file using the form, below. You may leave the
gremmie@1 11 form blank to reset your avatar to the default.
gremmie@1 12 </p>
gremmie@1 13 <p>
gremmie@1 14 Your file must be a recognizable graphic file, such as jpeg, gif, png, etc.
gremmie@1 15 The maximum size of an avatar is 100 x 100 pixels. If your uploaded file is larger than
gremmie@1 16 this it will be scaled down to 100 x 100 pixels. For best results, please ensure your
gremmie@1 17 image is square.
gremmie@1 18 </p>
bgneal@194 19 <form enctype="multipart/form-data" method="POST" action=".">{% csrf_token %}
gremmie@1 20 {{ form.as_p }}
gremmie@1 21 <input type="submit" value="Update Avatar" />
bgneal@310 22 &nbsp;<a href="{% url 'bio-me' %}">Cancel</a>
gremmie@1 23 </form>
gremmie@1 24 {% endblock %}