<div class="accordion" id="accordion_{{ plugin.slug }}">

{% for plugin, plugin_form in sidebar %}

  <div class="accordion-group">
    
    <div class="accordion-heading">
      <a class="accordion-toggle" href="#collapse_{{ plugin.slug }}" data-toggle="collapse">
        <h3>{{ plugin.sidebar.headline }} <span class="{{ plugin.sidebar.icon_class }}"></span></h3>
      </a>
    </div>
    
    <div id="collapse_{{ plugin.slug }}" class="accordion-body collapse{% if plugin_form.errors %} in{% endif %}">
      <div class="accordion-inner form-vertical">
        {% if plugin.sidebar.template %}
          {% with plugin_form as form and plugin as plugin %}
            <form method="POST" class="form-horizontal" action="?f={{ plugin_form.form_id }}" enctype="multipart/form-data">
              {% csrf_token %}
              {% include plugin.sidebar.template %}
            </form>
          {% endwith %}
        {% endif %}
      </div>
    </div>
  
  </div>
{% endfor %}
</div>


