Layout.
[wolnelektury.git] / src / wolnelektury / templates / forms / p.html
diff --git a/src/wolnelektury/templates/forms/p.html b/src/wolnelektury/templates/forms/p.html
new file mode 100644 (file)
index 0000000..be238bb
--- /dev/null
@@ -0,0 +1,20 @@
+{{ errors }}
+{% if errors and not fields %}
+  <p>{% for field in hidden_fields %}{{ field }}{% endfor %}</p>
+{% endif %}
+{% for field, errors in fields %}
+  {{ errors }}
+  <p{% with classes=field.css_classes %}{% if classes %} class="{{ classes }}"{% endif %}{% endwith %}>
+    {% if field.label %}{{ field.label_tag }}{% endif %}
+    {% if field.help_text %}
+    <br><span class="helptext">{{ field.help_text|safe }}</span>
+    {% endif %}
+    {{ field }}
+    {% if forloop.last %}
+      {% for field in hidden_fields %}{{ field }}{% endfor %}
+    {% endif %}
+  </p>
+{% endfor %}
+{% if not fields and not errors %}
+  {% for field in hidden_fields %}{{ field }}{% endfor %}
+{% endif %}