{% load i18n %}

<div class="col-md-6 mr-md-1">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">
                {% translate "Create link using ESI" %}
            </h3>
        </div>

        <div class="panel-body">
            <p>
                {% blocktranslate %}
                    This option will automatically register the entire fleet without
                    member clicks. Use this if you <b>are</b> Fleet Boss, otherwise
                    please use the clickable FAT link option.
                {% endblocktranslate %}
            </p>

            <form class="form" role="form" action="{% url 'afat:create_esi_fat' %}" method="POST">
                {% csrf_token %}

                <div class="form-group">
                    <label style="width: 100%; font-weight: normal;">
                        <span style="display: inline-block; margin-bottom: 5px; font-weight: 700;">
                            {% translate "Fleet Name" %}
                        </span>

                        <input type="text" class="form-control" name="name_esi" placeholder='{% translate "Enter fleet name" %}' required>
                    </label>
                </div>

                {% if link_types %}
                    <div class="form-group">
                        <label style="width: 100%; font-weight: normal;">
                            <span style="display: inline-block; margin-bottom: 5px; font-weight: 700;">
                                {% translate "Fleet Type (optional)" %}
                            </span>

                            <select class="form-control" name="type_esi">
                                <option value="-1">{% translate "Please select a fleet type" %}</option>

                                {% for type in link_types %}
                                    <option value="{{type.id}}">{{type.name}}</option>
                                {% endfor %}
                            </select>
                        </label>
                    </div>
                {% endif %}

                <div class="form-group text-right">
                    <button class="btn btn-primary" type="submit" name="submit_click">
                        <span class="fa fa-plus fa-fw"></span>

                        {% translate "Add ESI Link" %}
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
