{% extends "wagtailadmin/generic/base.html" %}
{% load i18n wagtailadmin_tags %}

{% block main_content %}
    <table class="listing">
        <thead>
            <tr>
                <th>{% trans "Outcome" %}</th>
                <th>{% trans "ID" %}</th>
                <th>{% trans "Name" %}</th>
                <th>{% trans "Slug" %}</th>
                <th>{% trans "Association" %}</th>
                <th>{% trans "External URL" %}</th>
                <th>{% trans "Events" %}</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><strong>{% trans "Survives" %}</strong></td>
                <td>{{ survivor.pk }}</td>
                <td>{{ survivor.name }}</td>
                <td>{{ survivor.slug }}</td>
                <td>{{ survivor.association|default:"—" }}</td>
                <td>{{ survivor.external_url|default:"—" }}</td>
                <td>{{ survivor_event_count }}</td>
            </tr>
            <tr>
                <td><strong>{% trans "Is deleted" %}</strong></td>
                <td>{{ loser.pk }}</td>
                <td>{{ loser.name }}</td>
                <td>{{ loser.slug }}</td>
                <td>{{ loser.association|default:"—" }}</td>
                <td>{{ loser.external_url|default:"—" }}</td>
                <td>{{ loser_event_count }}</td>
            </tr>
        </tbody>
    </table>

    <p class="help-block help-warning">
        {% blocktrans with loser_name=loser.name survivor_name=survivor.name trimmed %}
            Events organized by “{{ loser_name }}” will be moved to “{{ survivor_name }}”,
            and “{{ loser_name }}” will be deleted. This cannot be undone.
        {% endblocktrans %}
    </p>

    <form method="post" novalidate>
        {% csrf_token %}
        <ul class="fields">
            {% for field in form.visible_fields %}
                <li>{% formattedfield field %}</li>
            {% endfor %}
        </ul>
        <button type="submit" class="button serious">{% trans "Merge organizers" %}</button>
    </form>
{% endblock %}
