comment form
[prawokultury.git] / migdal / templates / comments / form.html
diff --git a/migdal/templates/comments/form.html b/migdal/templates/comments/form.html
new file mode 100755 (executable)
index 0000000..341750f
--- /dev/null
@@ -0,0 +1,29 @@
+{% load comments i18n %}
+<div class="comment-form">
+<h2 class="section">{% trans "Add comment" %}</h2>
+<form class="submit-form" action="{% comment_form_target %}" method="post">{% csrf_token %}
+  {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
+  {% for field in form %}
+    {% if field.is_hidden %}
+      {{ field }}
+    {% endif %}
+  {% endfor %}
+  <table>
+  {% for field in form %}
+    {% if not field.is_hidden %}
+      <tr
+        {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
+        <th>{{ field.label_tag }}
+      </th><td>
+        {% if field.errors %}<p class="error">{{ field.errors }}</p>{% endif %}
+        {{ field }}
+      </td></tr>
+    {% endif %}
+  {% endfor %}
+  <tr><td></td><td>
+    <button type="submit" name="post" class="submit-post">{% trans "Post" %}</button>
+    <button type="submit" name="preview" class="submit-preview">{% trans "Preview" %}</button>
+  </td></tr>
+  </table>
+</form>
+</div>