dirty, ugly but workable
[prawokultury.git] / migdal / templates / comments / migdal / entry / preview.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load comments %}
4 {% load gravatar %}
5 {% load migdal_tags markup_tags %}
6
7
8 {% block "body" %}
9
10 {% entry_begin form.target_object %}
11 {{ form.target_object.body }}
12
13 {% render_comment_list for form.target_object %}
14
15
16   <form action="{% comment_form_target %}" method="post">{% csrf_token %}
17     {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
18     {% if form.errors %}
19     <h1>{% blocktrans count counter=form.errors|length %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
20     {% else %}
21     <h1>{% trans "Preview your comment" %}</h1>
22     <dt>
23         <img src="{% gravatar_for_email form.email.value 24 %}"/>
24         {{ form.name.value }}
25     </dt>
26
27       <blockquote>{{ comment|textile_restricted_pl }}</blockquote>
28       <p>
29       {% trans "and" %} <input type="submit" name="submit" class="submit-post" value="{% trans "Post your comment" %}" id="submit" /> {% trans "or make changes" %}:
30       </p>
31     {% endif %}
32     {% for field in form %}
33       {% if field.is_hidden %}
34         <div>{{ field }}</div>
35       {% else %}
36         {% if field.errors %}{{ field.errors }}{% endif %}
37         <p
38           {% if field.errors %} class="error"{% endif %}
39           {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
40           {{ field.label_tag }} {{ field }}
41         </p>
42       {% endif %}
43     {% endfor %}
44     <p class="submit">
45     <input type="submit" name="submit" class="submit-post" value="{% trans "Post" %}" />
46     <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" />
47     </p>
48   </form>
49
50
51 {% endblock %}