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

{% block extrahead %}
    {{ block.super }}
    {{ media }}
    <script src="{% static 'admin/js/cancel.js' %}" async></script>
{% endblock %}

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

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate '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 }}</a>
&rsaquo; {% translate 'Merge' %}
</div>
{% endblock %}

{% block content %}
  <h2>
    {% translate "Selected tags" %}
  </h2>

  <form method="post">{% csrf_token %}
    <div>
      <ul style="margin-bottom: 20px">
        {% for obj in queryset %}
          <li>
            {{ obj.name }}
            <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}">
          </li>
        {% endfor %}
      </ul>

      <div style="margin-bottom: 20px">
        <label for="tag">Will be merged to:</label>
        <select id="tag" name="selected">
          {% for obj in queryset %}
            <option value="{{ obj.id }}">{{ obj.name }}</option>
          {% endfor %}
        </select>
      </div>

      <input type="hidden" name="action" value="merge_tags">
      <input type="hidden" name="post" value="yes">
      <input type="submit" value="{% translate 'Yes, I’m sure' %}">
      <a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
    </div>
  </form>
{% endblock %}
