{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
&rsaquo; {% trans 'submit' %}
</div>
{% endblock %}

{% block content %}
{% if has_workflow %}
    <p>{% blocktrans with escaped_object=object %}Are you sure you want to submit the {{ object_name }} "{{ escaped_object }}"? {% endblocktrans %}</p>
    <h3> {{ workflow_modal.code }} {{ workflow_modal.name }} </h3>

    <form action="" method="post">{% csrf_token %}
        {% if next_node %}
        <p class="next-node">{% trans "next node" %}：{{ next_node.name }}</p>
            {% if has_next_user %}
                <ul class="node-users">
                {% for user in next_users %}
                    <li><input type="checkbox" name="{{checkbox_name}}" value="{{user.id}}" checked> {{user.last_name}}{{user.first_name}}</li>
                {% endfor %}
                    </ul>
            {% else %}
                <p>{% trans "No user was configured to handle this node"%}</p>
            {% endif %}
        {% endif %}
    <div>
    <input type="hidden" name="post" value="yes" />
    {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
    {% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
    <input type="submit" value="{% trans "Yes, I'm sure" %}" />
    <a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% trans "No, take me back" %}</a>
    </div>
    </form>
{% else %}
    <p>{% trans "you needs to config a workflow model for this content type" %}</p>
    <a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% trans "OK" %}</a>
{% endif %}
{% endblock %}
