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

{% block form %}
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Interface</strong></div>
        <div class="panel-body">
            {% render_field form.name %}
            {% render_field form.enabled %}
            {% render_field form.mac_address %}
            {% render_field form.mtu %}
            {% render_field form.description %}
            {% render_field form.mode %}
            {% render_field form.untagged_vlan %}
            {% render_field form.tagged_vlans %}
            {% render_field form.tags %}
        </div>
    </div>
{% endblock %}

{% block buttons %}
    {% if obj.pk %}
        <button type="submit" name="_update" class="btn btn-primary">Update</button>
        <button type="submit" formaction="?return_url={% url 'virtualization:vminterface_edit' pk=obj.pk %}" class="btn btn-primary">Update and Continue Editing</button>
    {% else %}
        <button type="submit" name="_create" class="btn btn-primary">Create</button>
        <button type="submit" name="_addanother" class="btn btn-primary">Create and Add Another</button>
    {% endif %}
    <a href="{{ return_url }}" class="btn btn-default">Cancel</a>
{% endblock %}