Mercurial > public > sg101
comparison gpp/templates/bio/edit_elsewhere.html @ 194:6a5549c2efb5
Implement #62, add support for CSRF protection.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Apr 2010 20:00:56 +0000 |
parents | c7d75cdfea21 |
children | daa2916f5b34 |
comparison
equal
deleted
inserted
replaced
193:fa7d82bfb100 | 194:6a5549c2efb5 |
---|---|
7 <ul> | 7 <ul> |
8 {% for profile in request.user.social_network_profiles.all %} | 8 {% for profile in request.user.social_network_profiles.all %} |
9 <li> | 9 <li> |
10 <img src="{{ MEDIA_URL }}elsewhere/{{ profile.icon_name }}" alt="{{ profile.name }}" /> | 10 <img src="{{ MEDIA_URL }}elsewhere/{{ profile.icon_name }}" alt="{{ profile.name }}" /> |
11 <a href="{{ profile.url }}" rel="me">{{ profile.name }}</a> | 11 <a href="{{ profile.url }}" rel="me">{{ profile.name }}</a> |
12 <form id="delete-network-{{ profile.id }}" method="post" action="."> | 12 <form id="delete-network-{{ profile.id }}" method="post" action=".">{% csrf_token %} |
13 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> | 13 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> |
14 <input type="submit" name="delete-sn-form" value="Delete" class="button" /> | 14 <input type="submit" name="delete-sn-form" value="Delete" class="button" /> |
15 </form> | 15 </form> |
16 </li> | 16 </li> |
17 {% endfor %} | 17 {% endfor %} |
18 </ul> | 18 </ul> |
19 {% else %} | 19 {% else %} |
20 <p>No social network profiles.</p> | 20 <p>No social network profiles.</p> |
21 {% endif %} | 21 {% endif %} |
22 | 22 |
23 <form method="post" action="."> | 23 <form method="post" action=".">{% csrf_token %} |
24 <fieldset> | 24 <fieldset> |
25 <legend>Add a Social Network</legend> | 25 <legend>Add a Social Network</legend> |
26 {{ sn_form.as_p }} | 26 {{ sn_form.as_p }} |
27 <p>For MySpace, you must enter your | 27 <p>For MySpace, you must enter your |
28 <a href="http://faq.myspace.com/app/answers/detail/a_id/278" target="_blank">Myspace Friend ID</a> | 28 <a href="http://faq.myspace.com/app/answers/detail/a_id/278" target="_blank">Myspace Friend ID</a> |
36 <ul> | 36 <ul> |
37 {% for profile in request.user.instant_messenger_profiles.all %} | 37 {% for profile in request.user.instant_messenger_profiles.all %} |
38 <li> | 38 <li> |
39 <img src="{{ MEDIA_URL }}elsewhere/{{ profile.icon_name }}" alt="{{ profile.name }}" /> | 39 <img src="{{ MEDIA_URL }}elsewhere/{{ profile.icon_name }}" alt="{{ profile.name }}" /> |
40 {{ profile.name }}: <a href="{{ profile.url }}">{{ profile.username }}</a> | 40 {{ profile.name }}: <a href="{{ profile.url }}">{{ profile.username }}</a> |
41 <form id="delete-messenger-{{ profile.id }}" method="post" action="."> | 41 <form id="delete-messenger-{{ profile.id }}" method="post" action=".">{% csrf_token %} |
42 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> | 42 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> |
43 <input type="submit" name="delete-im-form" value="Delete" class="button" /> | 43 <input type="submit" name="delete-im-form" value="Delete" class="button" /> |
44 </form> | 44 </form> |
45 </li> | 45 </li> |
46 {% endfor %} | 46 {% endfor %} |
47 </ul> | 47 </ul> |
48 {% else %} | 48 {% else %} |
49 <p>No instant messenger profiles.</p> | 49 <p>No instant messenger profiles.</p> |
50 {% endif %} | 50 {% endif %} |
51 | 51 |
52 <form method="post" action="."> | 52 <form method="post" action=".">{% csrf_token %} |
53 <fieldset> | 53 <fieldset> |
54 <legend>Add an Instant Messenger</legend> | 54 <legend>Add an Instant Messenger</legend> |
55 {{ im_form.as_p }} | 55 {{ im_form.as_p }} |
56 <p><input type="submit" name="im-form" value="Add Instant Messenger" class="button" /></p> | 56 <p><input type="submit" name="im-form" value="Add Instant Messenger" class="button" /></p> |
57 </fieldset> | 57 </fieldset> |
62 <ul> | 62 <ul> |
63 {% for profile in request.user.website_profiles.all %} | 63 {% for profile in request.user.website_profiles.all %} |
64 <li> | 64 <li> |
65 <img src="{{ MEDIA_URL }}icons/world.png" alt="{{ profile.name }}" /> | 65 <img src="{{ MEDIA_URL }}icons/world.png" alt="{{ profile.name }}" /> |
66 <a href="{{ profile.url }}" rel="me">{{ profile.name }}</a> | 66 <a href="{{ profile.url }}" rel="me">{{ profile.name }}</a> |
67 <form id="delete-website-{{ profile.id }}" method="post" action="."> | 67 <form id="delete-website-{{ profile.id }}" method="post" action=".">{% csrf_token %} |
68 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> | 68 <input type="hidden" name="delete_id" value="{{ profile.id }}" /> |
69 <input type="submit" name="delete-w-form" value="Delete" class="button" /> | 69 <input type="submit" name="delete-w-form" value="Delete" class="button" /> |
70 </form> | 70 </form> |
71 </li> | 71 </li> |
72 {% endfor %} | 72 {% endfor %} |
73 </ul> | 73 </ul> |
74 {% else %} | 74 {% else %} |
75 <p>No website profiles.</p> | 75 <p>No website profiles.</p> |
76 {% endif %} | 76 {% endif %} |
77 | 77 |
78 <form method="post" action="."> | 78 <form method="post" action=".">{% csrf_token %} |
79 <fieldset> | 79 <fieldset> |
80 <legend>Add a Website</legend> | 80 <legend>Add a Website</legend> |
81 {{ w_form.as_p }} | 81 {{ w_form.as_p }} |
82 <p><input type="submit" name="w-form" value="Add Website" class="button" /></p> | 82 <p><input type="submit" name="w-form" value="Add Website" class="button" /></p> |
83 </fieldset> | 83 </fieldset> |