/django/contrib/comments/templates/comments/preview.html

https://code.google.com/p/mango-py/ · HTML · 36 lines · 34 code · 2 blank · 0 comment · 0 complexity · 227e5592a767dcf639f762d9c03b027e MD5 · raw file

  1. {% extends "comments/base.html" %}
  2. {% load i18n %}
  3. {% block title %}{% trans "Preview your comment" %}{% endblock %}
  4. {% block content %}
  5. {% load comments %}
  6. <form action="{% comment_form_target %}" method="post">{% csrf_token %}
  7. {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
  8. {% if form.errors %}
  9. <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
  10. {% else %}
  11. <h1>{% trans "Preview your comment" %}</h1>
  12. <blockquote>{{ comment|linebreaks }}</blockquote>
  13. <p>
  14. {% trans "and" %} <input type="submit" name="submit" class="submit-post" value="{% trans "Post your comment" %}" id="submit" /> {% trans "or make changes" %}:
  15. </p>
  16. {% endif %}
  17. {% for field in form %}
  18. {% if field.is_hidden %}
  19. <div>{{ field }}</div>
  20. {% else %}
  21. {% if field.errors %}{{ field.errors }}{% endif %}
  22. <p
  23. {% if field.errors %} class="error"{% endif %}
  24. {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
  25. {{ field.label_tag }} {{ field }}
  26. </p>
  27. {% endif %}
  28. {% endfor %}
  29. <p class="submit">
  30. <input type="submit" name="submit" class="submit-post" value="{% trans "Post" %}" />
  31. <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" />
  32. </p>
  33. </form>
  34. {% endblock %}