{% load i18n %}

    <div class="modal" id="optionsets-delete-modal" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h2 class="modal-title">
                        {% trans 'Delete option set' %}
                    </h2>
                </div>

                <div class="modal-body">
                    <p>
                        {% blocktrans trimmed with object='{$ service.values.uri $}' %}
                        You are about to permanently delete the option set <code>{{ object }}</code>.
                        {% endblocktrans %}
                    </p>

                    <p ng-show="service.values.options.length">
                        {% blocktrans trimmed %}
                        <strong>Important!</strong> This will also delete the following options:
                        {% endblocktrans %}
                    </p>

                    <ul class="list-unstyled">
                        <li ng-repeat="option in service.values.options">
                            <strong>{% trans 'Option' %}</strong>
                            <code>{$ option.uri $}</code>
                        </li>
                    </ul>

                    <div ng-show="service.values.questions.length">
                        <p>
                            {% blocktrans trimmed with questions_count='{$ service.values.questions.length $}' %}
                            This option set is also used in <b>{{ questions_count }} questions</b>.
                            {% endblocktrans %}
                        </p>

                        <p ng-show="service.values.options.length">
                            <b>{% trans 'This does not include references from the options above. Please check carefully.' %}</b>
                        </p>
                    </div>

                    <p class="text-danger">
                        {% trans 'This action cannot be undone!' %}
                    </p>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        {% trans 'Close' %}
                    </button>
                    <button type="button" class="btn btn-danger"
                            ng-click="service.submitDeleteModal('optionsets')">
                        {% trans 'Delete' %}
                    </button>
                </div>
            </div>
        </div>
    </div>
