{% load stories_admin %}

<fieldset class="module aligned {{ fieldset.classes }}">
  {% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}

  {% if fieldset.description %}
    <div class="description">{{ fieldset.description|safe }}</div>
  {% endif %}

  {% for line in fieldset %}
    <div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} ">
      {{ line.errors }}
      {% for field in line %}
        <div{% if not line.fields|length_is:"1" %} class="field-box"{% endif %}>
          {{ field.label_tag }}
          <p>{% dict_get field.field.form.initial field.field.name %}{{ field.field.as_hidden }}<p>
        </div>
      {% endfor %}
    </div>
  {% endfor %}
</fieldset>
