{% comment %}
1. Add hidden inputs.
2. Hide preview.
3. Add comment-form class to form tag.
{% endcomment %}

{% load comments i18n %}
<a name="comment"></a>
<form action="{% comment_form_target %}" method="post" class="comment-form">{% csrf_token %}
  <input type="hidden" name="next" value="{{ next|default:request.META.PATH_INFO }}" />
  <input type="hidden" name="paginate_by" value="{{ request.REQUEST.paginate_by }}" />

  {% 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 %}
  <div class="buttons">
    <input type="submit" name="post" class="submit-post" value="{% trans "Add comment" %}" />
  </div>
</form>
