{% load i18n %}

<div class="form-group clearfix">
    <label class="col-md-3 control-label" for="fleetDoctrine">{% translate "Ships / Doctrine" %}</label>
    <div class="col-md-9">
        <input id="fleetDoctrine" name="fleetDoctrine" type="text" class="form-control input-md" list="fleetDoctrineList">

        {% if fleet_doctrines|length > 0 %}
            <datalist id="fleetDoctrineList">
                {% for fleet_doctrine in fleet_doctrines %}
                    {% if use_fleet_doctrines %}
                        <option value="{{ fleet_doctrine.name }}" data-doctrine-url="{{ request.scheme }}://{{ request.get_host }}{% url 'fittings:view_doctrine' fleet_doctrine.pk %}">
                    {% else %}
                        <option value="{{ fleet_doctrine.name }}" data-doctrine-url="{{ fleet_doctrine.link }}">
                    {% endif %}
                {% endfor %}
            </datalist>
        {% endif %}
    </div>
</div>
