{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">{% trans "Home" %}</a>
        &rsaquo;
        <a href="{% url 'admin:app_list' 'dictionary' %}">{% trans "Dictionary" %}</a>
        &rsaquo;
        <a href="{% url 'admin:dictionary_author_changelist' %}">{% trans "Authors" %}</a>
        {% block crumbs %}
            {% if title %} &rsaquo; {{ title }}{% endif %}
        {% endblock %}
    </div>
{% endblock %}

{% block content %}
    <p style="background: #79aec8; padding: 1em; color: #fff; margin: 0;">{% trans "You have selected these users to suspend:" %}</p>
    {% load humanize %}
    <div style="border: 1px solid #79aec8; padding: 1em; border-top: none; margin-bottom: 1rem">
        {% for source in sources %}
            <p>
                <strong>
                    <a target="_blank" href="{{ source.get_absolute_url }}">{{ source.username }}</a>
                </strong>
                {% if source.last_entry_date %}
                    <small>({% trans "last entry date:" %}{{ source.last_entry_date|naturaltime }})</small>
                {% endif %}
            </p>
        {% endfor %}
    </div>

    <form method="post">
        <label for="quantity">{% trans "Time interval for suspension:" %}</label>
        <div style="margin-top: .5rem">
            <input type="number" id="quantity" name="quantity" min="1" max="100" value="7" style="height: 18px">
            <select name="multiplier">
                <option value="1">{% trans "hour(s)" %}</option>
                <option value="24" selected>{% trans "day(s)" %}</option>
                <option value="168">{% trans "week(s)" %}</option>
                <option value="730">{% trans "month(s)" %}</option>
                <option value="8760">{% trans "year(s)" %}</option>
            </select>
        </div>

        <div style="margin-top: 1rem;">
            <label for="information">{% trans "Information messages to be shown for users:" %} </label>
            <textarea name="information" rows="10" cols="100" id="information"
                      style="display: block; box-sizing: border-box; margin: .4rem 0"
                      placeholder="{% trans "(entry formatting options are available)" %}"
                      required></textarea>
            {% csrf_token %}
            <input type="submit" value="{% trans "Suspend" %}" class="default" style="float: none">
        </div>
    </form>
{% endblock %}
