{% import "macros.html" as macros with context %}
{% extends "base.html" %}
{% block content %}
<div class="row">
  <div class="col-md-4 col-md-offset-4">
    <ul class="nav nav-tabs">
    {% for method in forms %}
      <li{{ ' class="active"'|safe if loop.first }}>
        <a href="#{{ method[0].safe_name }}" data-toggle="tab">{{ method[0].name }}</a>
      </li>
    {% endfor %}
    </ul>
    <div class="panel panel-default">
      <div class="panel-body tab-content">
        {% for method in forms %}
        <div class="tab-pane{{ ' active'|safe if loop.first }}" id="{{ method[0].safe_name }}">
          {{ macros.render_form(method[1]) }}
        </div>
        {% endfor %}
      </div>
    </div>
  </div>
</div>
{% endblock content %}
