{% extends 'utilities/obj_edit.html' %}
{% load static from staticfiles %}
{% load form_helpers %}

{% block form %}
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Circuit</strong></div>
        <div class="panel-body">
            {% render_field form.provider %}
            {% render_field form.cid %}
            {% render_field form.type %}
            {% render_field form.install_date %}
            {% render_field form.port_speed %}
            {% render_field form.commit_rate %}
            {% render_field form.xconnect_id %}
            {% render_field form.pp_info %}
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Termination</strong></div>
        <div class="panel-body">
            {% render_field form.site %}
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#select" aria-controls="home" role="tab" data-toggle="tab">Select</a></li>
                <li role="presentation"><a href="#search" aria-controls="search" role="tab" data-toggle="tab">Search</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="select">
                    {% render_field form.rack %}
                    {% render_field form.device %}
                </div>
                <div class="tab-pane" id="search">
                    {% render_field form.livesearch %}
                </div>
            </div>
            {% render_field form.interface %}
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Comments</strong></div>
        <div class="panel-body">
            {% render_field form.comments %}
        </div>
    </div>
{% endblock %}

{% block javascript %}
<script src="{% static 'js/livesearch.js' %}"></script>
{% endblock %}
