Mercurial > public > sg101
comparison gpp/templates/forums/topic.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 | 500e5875a306 |
children | a46788862737 |
comparison
equal
deleted
inserted
replaced
193:fa7d82bfb100 | 194:6a5549c2efb5 |
---|---|
35 {% endfor %} | 35 {% endfor %} |
36 </table> | 36 </table> |
37 {{ page_nav }} | 37 {{ page_nav }} |
38 {% if can_moderate %} | 38 {% if can_moderate %} |
39 <div class="forum-mod-controls"> | 39 <div class="forum-mod-controls"> |
40 <form action="{% url forums-mod_topic_stick topic.id %}" method="post"> | 40 <form action="{% url forums-mod_topic_stick topic.id %}" method="post">{% csrf_token %} |
41 <input type="submit" value="{% if topic.sticky %}Unstick{% else %}Stick{% endif %} Topic" /> | 41 <input type="submit" value="{% if topic.sticky %}Unstick{% else %}Stick{% endif %} Topic" /> |
42 </form> | 42 </form> |
43 <form action="{% url forums-mod_topic_lock topic.id %}" method="post"> | 43 <form action="{% url forums-mod_topic_lock topic.id %}" method="post">{% csrf_token %} |
44 <input type="submit" value="{% if topic.locked %}Unlock{% else %}Lock{% endif %} Topic" /> | 44 <input type="submit" value="{% if topic.locked %}Unlock{% else %}Lock{% endif %} Topic" /> |
45 </form> | 45 </form> |
46 <form action="{% url forums-mod_topic_delete topic.id %}" method="post"> | 46 <form action="{% url forums-mod_topic_delete topic.id %}" method="post">{% csrf_token %} |
47 <input type="submit" value="Delete Topic" id="forum-mod-del-topic" /> | 47 <input type="submit" value="Delete Topic" id="forum-mod-del-topic" /> |
48 </form> | 48 </form> |
49 <a href="{% url forums-mod_topic_move topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> | 49 <a href="{% url forums-mod_topic_move topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> |
50 <a href="{% url forums-mod_topic_move topic.id %}">Move this topic</a> | 50 <a href="{% url forums-mod_topic_move topic.id %}">Move this topic</a> |
51 <a href="{% url forums-mod_topic_split topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> | 51 <a href="{% url forums-mod_topic_split topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> |
57 <a name="forum-reply-form"></a> | 57 <a name="forum-reply-form"></a> |
58 {% show_form "Reply to Topic" form "Submit Reply" 1 MEDIA_URL %} | 58 {% show_form "Reply to Topic" form "Submit Reply" 1 MEDIA_URL %} |
59 {% endif %} | 59 {% endif %} |
60 | 60 |
61 {% if user.is_authenticated %} | 61 {% if user.is_authenticated %} |
62 <form action={% if is_subscribed %}"{% url forums-unsubscribe_topic topic.id %}"{% else %}"{% url forums-subscribe_topic topic.id %}"{% endif %} method="post"> | 62 <form action={% if is_subscribed %}"{% url forums-unsubscribe_topic topic.id %}"{% else %}"{% url forums-subscribe_topic topic.id %}"{% endif %} method="post">{% csrf_token %} |
63 <fieldset> | 63 <fieldset> |
64 <legend>Subscription Options</legend> | 64 <legend>Subscription Options</legend> |
65 <p> | 65 <p> |
66 {% if is_subscribed %} | 66 {% if is_subscribed %} |
67 <img src="{{ MEDIA_URL }}icons/email_delete.png" alt="Email" /> | 67 <img src="{{ MEDIA_URL }}icons/email_delete.png" alt="Email" /> |