{% extends 'modal_base.html' %}
{% load i18n %}

{% block title %}
	{% trans 'Merge users' %}
{% endblock %}

{% block body %}
    <form action="{% url 'accounts:user-merge' user_uuid=mtpuser.id %}?duplicate_user_uuid={{ duplicate_user.id }}" method="post">{% csrf_token %}
        <div class="modal-body">
            <p>
                {% trans 'Your are about to merge the following accounts:' %}
            </p>
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th>{% trans 'Action' %}</th>
                        <th>{% trans 'Username' %}</th>
                        <th>{% trans 'First name' %}</th>
                        <th>{% trans 'Last name' %}</th>
                        <th>{% trans 'Created on' %}</th>
                        <th>{% trans 'Origin' %}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <i class="fa fa-check-circle text-success"></i> {% trans 'Keep' %}
                        </td>
                        <td>{{ mtpuser.username }}</td>
                        <td>{{ mtpuser.first_name }}</td>
                        <td>{{ mtpuser.last_name }}</td>
                        <td>{{ mtpuser.date_joined }}</td>
                        <td>{{ mtpuser.get_created_from_display }}</td>
                    </tr>
                    <tr>
                        <td>
                            <i class="fa fa-times-circle text-danger"></i> {% trans 'Merge' %}
                        </td>
                        <td>{{ duplicate_user.username }}</td>
                        <td>{{ duplicate_user.first_name }}</td>
                        <td>{{ duplicate_user.last_name }}</td>
                        <td>{{ duplicate_user.date_joined }}</td>
                        <td>{{ duplicate_user.get_created_from_display }}</td>
                    </tr>
                </tbody>
            </table>
            <p>
                <strong>{% trans 'This action cannot be undone, do you want to continue?' %}</strong>
            </p>
        </div>
        <div class="modal-footer clearfix">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">{% trans 'Cancel' %}</button>
            <input class="btn btn-danger pull-right" type="submit" value="{% trans 'Confirm' %}" />
        </div>
    </form>
{% endblock %}
