{% load i18n %}

    <div class="modal" id="timeframes-form-modal" tabindex="-1">
        <div class="modal-dialog">
            <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 'Task' %}
                    </h2>
                </div>

                <div class="modal-body">
                    <formgroup
                        data-id="start_attribute"
                        data-type="selectnumber"
                        data-label="{{ meta.Task.start_attribute.verbose_name }}"
                        data-help="{{ meta.Task.start_attribute.help_text }}"
                        data-model="service.values.start_attribute"
                        data-errors="service.errors.start_attribute"
                        data-options="service.attributes"
                        data-options-label="uri"
                        data-options-null="1"
                        data-quicksearch="true">
                    </formgroup>
                    <formgroup
                        data-id="end_attribute"
                        data-type="selectnumber"
                        data-label="{{ meta.Task.end_attribute.verbose_name }}"
                        data-help="{{ meta.Task.end_attribute.help_text }}"
                        data-model="service.values.end_attribute"
                        data-errors="service.errors.end_attribute"
                        data-options="service.attributes"
                        data-options-label="uri"
                        data-options-null="1"
                        data-quicksearch="true">
                    </formgroup>
                    <div class="row">
                        <div class="col-sm-6">
                            <formgroup
                                data-id="days_before"
                                data-type="number"
                                data-label="{{ meta.Task.days_before.verbose_name }}"
                                data-help="{{ meta.Task.days_before.help_text }}"
                                data-model="service.values.days_before"
                                data-errors="service.errors.days_before">
                            </formgroup>
                        </div>
                        <div class="col-sm-6">
                            <formgroup
                                data-id="days_after"
                                data-type="number"
                                data-label="{{ meta.Task.days_after.verbose_name }}"
                                data-help="{{ meta.Task.days_after.help_text }}"
                                data-model="service.values.days_after"
                                data-errors="service.errors.days_after">
                            </formgroup>
                        </div>
                    </div>
                </div>

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