nautobot_version_control extends 'base.html' %}
{% load form_helpers %}
{% load helpers %}

{% block content %}
<form action="" method="post" enctype="multipart/form-data" class="form form-horizontal">
    {% csrf_token %}
    {% for field in form.hidden_fields %}
    {{ field }}
    {% endfor %}
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            {% if form.non_field_errors %}
            <div class="panel panel-danger">
                <div class="panel-heading"><strong>Errors</strong></div>
                <div class="panel-body">
                    {{ form.non_field_errors }}
                </div>
            </div>
            {% endif %}

            {% block form %}
            <div class="panel panel-default">
                <div class="panel-heading"><strong>Merge</strong></div>
                <div class="panel-body">
                    <div class="row">
                        <div class="panel-body">
                            {% render_field form.source_branch %}
                            {% render_field form.destination_branch %}
                        </div>
                    </div>
                </div>
            </div>
            {% include 'inc/extras_features_edit_form_fields.html' %}
            {% endblock %}
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3 text-right">
            <a href="{{ back_btn_url }}" class="btn btn-warning">
                Back
            </a>
            <button type="submit" name="_update" class="btn btn-primary">
                Merge
            </button>
        </div>
    </div>
</form>

<br>

{% include 'nautobot_version_control/conflicts.html' with conflicts=conflicts %}

<br>

{% include 'nautobot_version_control/diffs.html' with results=results %}

{% if obj and settings.DOCS_ROOT %}
{% include 'inc/modal.html' with name='docs' content=obj|get_docs %}
{% endif %}
{% endblock %}
