summaryrefslogtreecommitdiff
path: root/templates/form.html
blob: 38dd0ea13bf60c0266e697bcd03b717dbcf35a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% extends "base.html" %}
{% block content %}
   <div class="page-header">
    <h1>{% block formtitle %}{{formtitle}}{% endblock %}</h1>
   </div>
   {% block beforeform %}{% endblock %}

<form method="POST" enctype="multipart/form-data">
    {% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %}
    <div id="wizard">
        <ol>
            {% for fieldset in form.fieldsets %}
                <li>{{ fieldset.legend }}</li>
            {% endfor %}
        </ol>
	{% for fieldset in form.fieldsets %}
        <div id="{{fieldset.name}}" class="{{ fieldset.classes }}">
          {% if fieldset.description %}
          <p>{{ fieldset.description }}</p>
          {% endif %}
          {% for field in fieldset %}
            {% if field.is_hidden %}
              {{ field }}
            {% else %}
                {{ field.errors }}
                <label for="id_{{ field.html_name }}">{{ field.label }}{% if field.field.required %}<b>*</b>{% endif %}</label>
                {{ field }}
            {% endif %}
          {% endfor %}
            <style type="text/css">
                .bwizard-steps li > div > input.btn { display: none; }
            </style>
            <input class="btn btn-success" type="submit" value="{{ submitname }}" />
        </div>
    {% endfor %}
    </div>
  </form>

{% endblock %}