Skip to content
Browse files

more sane template

  • Loading branch information...
1 parent 4e321be commit aebe52702f5fc412c09caceb60ea475b0e75fd62 @digi604 committed Jun 3, 2010
Showing with 17 additions and 10 deletions.
  1. +17 −10 uni_form/templates/uni_form/whole_uni_form_set.html
View
27 uni_form/templates/uni_form/whole_uni_form_set.html
@@ -1,16 +1,23 @@
{% load uni_form_tags i18n %}
-<form action="{{ form_action }}" class="uniForm {{ form_class }}" method="{{ form_method }}"{% if form_id %} id="{{ form_id|slugify }}"{% endif %}{% if formset.is_multipart %} enctype="multipart/form-data"{% endif %}>
+{% if form_tag %}<form action="{{ form_action|lower }}" class="uniForm{% if form_class %} {% endif %}{{ form_class }}" method="{{ form_method }}"{% if form_id %} id="{{ form_id|slugify }}"{% endif %}{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>{% endif %}
{% csrf_token %}
+ {% if formset.non_field_errors %}
+ <div id="errorMsg">
+ <h3>{% if error_message_title %}{{ error_message_title }}{% else %}Errors{% endif %}</h3>
+ <ol>
+ {{ form.non_field_errors|unordered_list }}
+ </ol>
+ </div>
+ {% endif %}
{{ formset.management_form|as_uni_form }}
- <fieldset class="inlineLabels">
- <legend>* {% trans "Required fields" %}</legend>
- {% for form in formset.forms %}
- {% if form.form_html %}{{ form.form_html }}{% else %}
- {{ form|as_uni_form }}
- {% endif %}
- {% endfor %}
- </fieldset>
+ {% for form in formset.forms %}
+ {% if form.form_html %}
+ {{ form.form_html }}
+ {% else %}
+ {{ form|as_uni_form }}
+ {% endif %}
+ {% endfor %}
{% if inputs %}
<div class="buttonHolder">
{% for input in inputs %}
@@ -25,4 +32,4 @@
{% endfor %}
</div>
{% endif %}
-</form>
+{% if form_tag %}</form>{% endif %}

0 comments on commit aebe527

Please sign in to comment.
Something went wrong with that request. Please try again.