{% load i18n %}

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

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