{% extends "cfp/event/base.html" %}
{% load bootstrap4 %}
{% load compress %}
{% load i18n %}
{% load static %}

{% block title %}{% translate "Your proposal" %} :: {% endblock %}

{% block content %}
    <div class="col-md-10 ml-auto mr-auto">
        <h2>{% translate "Your proposal:" %} {{ submission.title }}</h2>
        <p>
            {% translate "Current state of your proposal:" %}
            {% include "cfp/event/fragment_state.html" with state=submission.state %}
        </p>
        {% if submission.submission_type and request.event.submission_types.all|length > 1 %}<p>{% translate "Session type" %}: {{ submission.submission_type }}</p>{% endif %}
        {% if submission.track and request.event.tracks.all|length > 1 %}<p>{% translate "Track" %}: {{ submission.track.name }}</p>{% endif %}
        {% if request.event.locales|length > 1 %}<p>{% translate "Language" %}: {{ submission.get_content_locale_display }}</p>{% endif %}
        <div class="text">
            {% blocktranslate trimmed %}
                Congratulations on your acceptance!
            {% endblocktranslate %}
            {% if form.availabilities %}
                {% blocktranslate trimmed %}
                    Please provide us with your available hours during the event, so that we can schedule your event accordingly:
                {% endblocktranslate %}
                <p></p>
            {% endif %}
        </div>
        <form method="post">
            {% csrf_token %}
            {% if form.availabilities %}
                {% compress js %}
                    <script defer src="{% static "vendored/moment-with-locales.js" %}"></script>
                    <script defer src="{% static "vendored/moment-timezone-with-data-2012-2022.js" %}"></script>
                {% endcompress %}
                {% include "common/availabilities.html" %}
                {% bootstrap_field form.availabilities layout='inline' %}
                <small class="form-text text-muted">{{ form.availabilities.help_text }}</small>
            {% endif %}
            <p></p>
            {% blocktranslate trimmed %}
                By confirming your proposal, you agree that you are able and willing to participate in this event and
                present the content of this proposal.
                The proposal data, such as title, abstract, description, and any uploads you provided, can be made
                publicly available once the proposal is confirmed.
            {% endblocktranslate %}
            <p></p>
            <div class="submit-group"><span>
                <a href="{{ submission.urls.user_base }}"
                    class="btn btn-lg btn-info">
                    {% translate "Go back" %}
                </a>
                <a href="{{ submission.urls.withdraw }}"
                    class="btn btn-lg btn-danger">
                    {% translate "Withdraw" %}
                </a>
            </span>
                <span>
                    <button type="submit"
                        class="btn btn-lg btn-success">
                        {% translate "Confirm" %}
                    </button>
                </span></div>
        </form>
    </div>
{% endblock %}
