{% load i18n %}

    <div class="modal" id="templates-form-modal" tabindex="-1">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" tabindex="-1">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h2 class="modal-title">
                        {% trans 'Template' %}
                    </h2>
                </div>

                <div class="modal-body">
                    <formgroup
                        data-id="template"
                        data-type="codemirror"
                        data-label="{{ meta.View.template.verbose_name }}"
                        data-help="{{ meta.View.template.help_text }}"
                        data-model="service.values.template"
                        data-errors="service.errors.template"
                        data-mode="django">
                    </formgroup>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        {% trans 'Close' %}
                    </button>
                    <button type="button" class="btn btn-default"
                            ng-click="service.submitFormModal('templates', false)">
                        {% trans 'Save' %}
                    </button>
                    <button type="button" class="btn btn-primary"
                            ng-click="service.submitFormModal('templates')">
                        {% trans 'Save and close' %}
                    </button>
                </div>
            </div>
        </div>
    </div>
