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

{% block form %}
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Rack</strong></div>
        <div class="panel-body">
            {% render_field form.site %}
            {% render_field form.name %}
            {% render_field form.facility_id %}
            {% render_field form.group %}
            {% render_field form.status %}
            {% render_field form.role %}
            {% render_field form.serial %}
            {% render_field form.asset_tag %}
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Tenancy</strong></div>
        <div class="panel-body">
            {% render_field form.tenant_group %}
            {% render_field form.tenant %}
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Dimensions</strong></div>
        <div class="panel-body">
            {% render_field form.type %}
            {% render_field form.width %}
            {% render_field form.u_height %}
            <div class="form-group">
                <label class="col-md-3 control-label">Outer dimensions</label>
                <div class="col-md-3">
                    {{ form.outer_width }}
                </div>
                <div class="col-md-3">
                    {{ form.outer_depth }}
                </div>
                <div class="col-md-2">
                    {{ form.outer_unit }}
                </div>
            </div>
            {% render_field form.desc_units %}
        </div>
    </div>
    {% if form.custom_fields %}
        <div class="panel panel-default">
            <div class="panel-heading"><strong>Custom Fields</strong></div>
            <div class="panel-body">
                {% render_custom_fields form %}
            </div>
        </div>
    {% endif %}
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Tags</strong></div>
        <div class="panel-body">
            {% render_field form.tags %}
        </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 %}
