summaryrefslogtreecommitdiff
path: root/design/templates/comments/preview.html
blob: 58eba014d4a4672d9ed8808f4c5b3eb605f2fd88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% extends "base.html" %}
{% load i18n %}



{% block primary %}
        <main role="main" class="archive">
    <h1 class="comment--form--header-h1">{% trans "Preview your comment" %}</h1>
  {% load comments %}
  <form action="{% comment_form_target %}" method="post" class="cform-arc comment--form">{% csrf_token %}
    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
    {% if form.errors %}
    <h1>{% if form.errors|length == 1 %}{% trans "Please correct the error below" %}{% else %}{% trans "Please correct the errors below" %}{% endif %}</h1>
    {% else %}
      <blockquote>{{ comment|linebreaks }}</blockquote>
      <p>
      <input type="submit" name="submit" class="submit-post" value="{% trans "Post your comment" %}" id="submit" /> <h3>{% trans "Or make changes" %}:</h3>
      </p>
    {% endif %}
    {% for field in form %}
      {% if field.is_hidden %}
        <div>{{ field }}</div>
      {% else %}
        {% if field.errors %}{{ field.errors }}{% endif %}
        <p
          {% if field.errors %} class="error"{% endif %}
          {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
          {{ field.label_tag }} {{ field }}
        </p>
      {% endif %}
    {% endfor %}
    <p class="submit">
    <input type="submit" name="submit" class="submit-post" value="{% trans "Post" %}" />
    <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" />
    </p>
  </form>
  </main>
{% endblock %}