{% extends 'base.html' %}

{% block content %}
<div class="row justify-content-sm-center">
    <div class="col-sm text-center align-self-center m-2">
        <p><b>Are you sure</b> you want to <b class="text-danger">delete</b> the user '{{ username }}'?</p>
    </div>
</div>
{% if deleted_groups %}
<div class="row justify-content-sm-center border border-warning rounded m-2">
    <div class="col-sm text-center align-self-center m-2">
        <p><u class="text-warning">Warning:</u> Since {{ username }} is their only member, the following <b>groups</b> will be deleted as well:</p>
    </div>
    <div class="col-sm text-center align-self-center m-2">
        <ul class="list-group">
            {% for groupname in deleted_groups %}
            <li class="list-group-item">{{ groupname }}</li>
            {% endfor %}
        </ul>
    </div>
</div>
{% endif %}
<div class="row justify-content-sm-center">
    <div class="col-sm text-center align-self-center m-2">
        <a class="btn btn-secondary"
           href="{{ url_for('usermanager.user_view', username=username) }}"
           role="button">No, take me back!</a>
    </div>
    <div class="col-sm text-center align-self-center m-2">
        <form method="post">
            <input class="btn btn-danger" type="submit" value="Yes, delete this user.">
        </form>
    </div>
</div>
{% endblock content %}
