{% extends "base.html" %}
{% load promgen %}
{% block content %}

<div class="page-header">
  <h1>{{object|klass}}: {{object.name}}</h1>
</div>

{% breadcrumb object 'Register Notifier' %}

<div class="row">
  <div class="col-md-3">
    <ul class="nav nav-pills nav-stacked" role="tablist">
      {% for k, v in view.model.driver_set|dictsort:0 %}
      <li role="presentation">
        <a href="#{{ k|slugify }}" aria-controls="{{ k|slugify }}" role="tab" data-toggle="tab">{{ k }}</a>
      </li>
      {% endfor %}
    </ul>
  </div>

  <div class="col-md-8 tab-content">
    {% for k, v in view.model.driver_set|dictsort:0 %}

    <div role="tabpanel" class="tab-pane panel panel-default" id="{{ k|slugify }}">
        <form action="" method="post">{% csrf_token %}
          <input type="hidden" name="sender" value="{{k}}" />
          <div class="panel-body">
            <pre class="help-block">{{ v.help|urlize }}</pre>
          </div>
          <table class="table">
            {{ v.form.as_table }}
          </table>
          <div class="panel-footer">
            <button class="btn btn-primary">Register Notifier</button>
          </div>
          </form>
    </div>
    {% endfor %}
  </div>
</div>
{% endblock %}
