summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-04 18:10:33 +0100
committerDan McGee <dan@archlinux.org>2011-03-04 18:10:33 +0100
commitb5c67fad51b05b105487ff73c2d803ad9951f894 (patch)
tree9553f5603ea5dc2ed205cb91f5e878182898caf6 /templates
parentc722d8bf9e2f647d5cd8fa3a85a17d0cb3b5b101 (diff)
downloadarchweb-b5c67fad51b05b105487ff73c2d803ad9951f894.tar.gz
archweb-b5c67fad51b05b105487ff73c2d803ad9951f894.tar.xz
Get general form up to snuff
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/general_form.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/general_form.html b/templates/general_form.html
index 12b3546..1fa3351 100644
--- a/templates/general_form.html
+++ b/templates/general_form.html
@@ -6,14 +6,18 @@
<h2>{{title}}</h2>
- {% if description %}{{description}}{% endif %}
+ {{description}}
+ {{form.non_field_errors}}
<form class="general-form" method="post">{% csrf_token %}
<fieldset>
{% for field in form %}
- <p><label>{{field.label}}{% if field.help_text %}:</label><br />
- <span class="form-help">{{field.help_text}}</span> {% else %}:</label> {% endif %}
- {{field}} {% if field.required %}<span class="form-req-field">*</span>{% endif%}</p>
+ {{field.errors}}
+ <p><label for="{{field.auto_id}}">{{field.label}}:</label>
+ {% if field.help_text %}<br/><span class="form-help">{{field.help_text}}</span>{% endif %}
+ {{field}}
+ {% if field.field.required %}<span class="form-req-field">*</span>{% endif %}
+ </p>
{% endfor %}
</fieldset>
<p><label></label> <input type="submit" value="{{submit_text}}" /></p>