{% load assets %}

<tr{% if form.non_field_errors %}class="error"{% endif %}>
  <td style="vertical-align:middle" data-no="{{ counter }}">
    <span class="ordinal">{{ counter }}</span>
    {% for field in form.hidden_fields %}{{ field }}{% endfor %}
  </td>
  {% for field in form.visible_fields %}
    <td class="control-group{% if "-support_period" in field.html_name %} small{% endif %}{% if field.errors %} error{% endif %}" style="vertical-align:middle">
      {% if field|is_checkbox %}
        <a href="#" class="btn-small btn-danger delete_row">{{ field }}-</a>
        {% for error in form.non_field_errors %}
        <div class="clearfix"></div>
          <div class="alert alert-error">{{ error }}</div>
        {% endfor %}
      {% else %}
        {{ field }}
      {% endif %}
      {% if field.errors %}
        <span class="help-inline">{% for error in field.errors %}{{ error }} {% endfor %}</span>
      {% endif %}
    </td>
  {% endfor %}
</tr>
