{% load django_bootstrap5 %}
{% load i18n %}

<form id="aa-fleetping-form">
    {% csrf_token %}

    <fieldset class="aa-fleetpings-form">
        <!-- ping_target -->
        {% bootstrap_field form.ping_target %}
        {% include "fleetpings/partials/form/hints/ping-everyone.html" %}

        <!-- ping_channel -->
        {% if webhooks_configured %}
            {% bootstrap_field form.ping_channel %}
        {% endif %}

        <!-- fleet_type -->
        {% bootstrap_field form.fleet_type %}
        {% bootstrap_field form.webhook_embed_color show_label=False %}

        <!-- fleet_commander -->
        {% bootstrap_field form.fleet_commander %}

        <!-- fleet_name -->
        {% bootstrap_field form.fleet_name %}

        <!-- formup_location -->
        {% bootstrap_field form.formup_location %}

        <!-- pre_ping -->
        {% bootstrap_field form.pre_ping %}

        <!-- formup_time -->
        {% bootstrap_field form.formup_time %}
        {% bootstrap_field form.formup_timestamp show_label=False %}

        <!-- optimer -->
        {% if optimer_installed %}
            <div class="fleetpings-create-optimer clearfix" style="display: none;">
                {% bootstrap_field form.optimer %}
            </div>
        {% endif %}

        {% bootstrap_field form.formup_now %}

        <!-- fleet_duration -->
        {% bootstrap_field form.fleet_duration %}

        <!-- fleet_comms -->
        {% bootstrap_field form.fleet_comms %}

        <!-- fleet_doctrine -->
        {% bootstrap_field form.fleet_doctrine %}
        {% bootstrap_field form.fleet_doctrine_url show_label=False %}

        <!-- srp -->
        {% bootstrap_field form.srp %}

        <!-- srp_link -->
        {% if srp_module_available_to_user %}
            <div class="fleetpings-create-srp-link clearfix" style="display: none;">
                {% bootstrap_field form.srp_link %}
            </div>
        {% endif %}

        <!-- additional_information -->
        {% bootstrap_field form.additional_information %}

        <div class="form-group mt-3 clearfix">
            <div class="fleetpings-form-message"></div>

            {% translate "Create ping" as button_text %}
            {% bootstrap_button button_class="btn btn-primary" content=button_text name="createPingText" id="createPingText" %}
        </div>
    </fieldset>
</form>
