Commit 589183a5 authored by Patrick Kimber's avatar Patrick Kimber

align form. try and improve error messages

parent 985651a5
<form action="." method="post" {% if multipart %}enctype="multipart/form-data"{% endif %} class="pure-form pure-form-stacked">
<form action="." method="post" {% if multipart %}enctype="multipart/form-data"{% endif %} class="pure-form {% if aligned %}pure-form-aligned{% else %}pure-form-stacked{% endif %}">
{% csrf_token %}
{{ form.non_field_errors }}
<fieldset>
......@@ -8,10 +8,15 @@
{% for field in form %}
<div class="pure-control-group">
<label for='{{ field.id_for_label }}'>{{ field.label }}{% if field.help_text %} {{ field.help_text }}{% endif %}:</label>
{% if aligned %}
{{ field }}
{% endif %}
{% for error in field.errors %}
<aside class="pure-help-inline">{{ error }}</aside>
<mark>{{ error }}</mark>
{% endfor %}
{{ field }}
{% if not aligned %}
{{ field }}
{% endif %}
</div>
{% endfor %}
<div class="pure-controls">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment