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

{% block title %}
{% if create_draft_allowed %}
    {% trans 'Draft creation confirmation' %}
{% else %}
    {% trans 'Draft creation not allowed' %}
{% endif %}
{% endblock title %}

{% block body %}
{% if create_draft_allowed %}
    <form action="{{ training.get_create_draft_url }}" method="post">{% csrf_token %}
        <div class="modal-body">
            <p>
                {% blocktrans trimmed with training_name=training.name %}
                    Are you sure you want to create a new draft for the training "{{ training_name }}"?
                {% endblocktrans %}
            </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>
{% else %}/
    <div class="modal-body">
        <p>
        {% blocktrans trimmed with training_name=training.name %}
            It's not possible to create a new draft for the training "{{ training_name }}" for the
            following reason:
        {% endblocktrans %}
        </p>
        <p>
            <strong>{{ create_draft_not_allowed_reason }}</strong>
        </p>
    </div>
    <div class="modal-footer clearfix">
        <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">{% trans 'Cancel' %}</button>
    </div>
{% endif %}
{% endblock body %}
