{% extends "admin/scheduler/scheduler_base.html" %}
{% load scheduler_tags %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">Home</a> &rsaquo;
        <a href="{% url 'queues_home' %}">Queues</a> &rsaquo;
        <a href="{% url 'queue_registry_jobs' queue.name 'queued' %}">{{ queue.name }}</a> &rsaquo;
        {{ action|capfirst }}
    </div>
{% endblock %}

{% block content_title %}<h1>Are you sure?</h1>{% endblock %}

{% block content %}
    <div id="content-main">
        <p>
            Are you sure you want to <b>{{ action|capfirst }}</b> the {{ total_jobs }} selected jobs from
            <a href="{% url 'queue_registry_jobs' queue.name 'queued' %}" target="_blank">{{ queue.name }}</a>
            ? These jobs are selected:
        </p>
        <ul>
            {% for job in jobs %}
                <li>
                    <a href="{% url 'job_details' job.id %}" target="_blank">{{ job.id }}</a>
                    {{ job | show_func_name }}
                </li>
            {% endfor %}
        </ul>
        <form action="{{ action_url }}" method="post">
            {% csrf_token %}
            <div>
                {% for job in jobs %}
                    <input type="hidden" name="job_ids" value="{{ job.id }}">
                {% endfor %}
                <input type="hidden" name="action" value="{{ action }}"/>
                <input type="hidden" name="next_url" value="{{ next_url }}"/>
                <input type="submit" value="Yes, I'm sure"/>
            </div>
        </form>
    </div>
{% endblock %}
