{% extends 'base/layout.html' %}
{% load form_helpers %}

{% block title %}Add {{ component_type }} to {{ parent }}{% endblock %}

{% render_errors form %}

{% block content %}
<form action="." method="post">
    {% csrf_token %}
    <div class="row">
        <div class="col col-md-6">
            <div class="field-group mb-3">
                <h4>New {{ component_type }}</h4>
                    <div class="form-floating mb-3">
                        <input class="form-control" value="{{ parent }}" disabled />
                        <label>Device Type</label>
                    </div>
                    {% render_form form %}
                </div>
            </div>
            <div class="col col-md-9">
                <a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
                <button type="submit" name="_update" class="btn btn-primary">Save</button>
            </div>
        </div>
    </div>
</form>
{% endblock %}
