<div class="d-inline-flex">
<div>
    <input type="{{ widget.type }}" name="{{ widget.name }}"
    {% if widget.value != None %}
    value="{{ widget.value|stringformat:'s' }}"
    {% endif %}
    {% include "django/forms/widgets/attrs.html" %}
>
    <span class="text-muted small">Atual: </span>
    <strong class="ml-2">
        {% if link_url %}
            <a class="kt-font-bold" href="{{ link_url }}">
        {% endif %}
        {% if link_label %}{{ link_label }}{% else %}Nenhum{% endif %}
        {% if link_url %}
            </a>
        {% endif %}
    </strong>

</div>


{% if related_url %}
    <a data-search="{{ widget.name }}"
       href="{% if widget.attrs.search_url %}{{ widget.attrs.search_url }}{% else %}{{ related_url }}{% endif %}"
       class="ml-3 related-lookup align-self-center" id="lookup_id_{{ widget.name }}"
       title="{{ link_title }}">
        <i class="fas fa-search"></i> Buscar
    </a>
{% endif %}

{% if link_label %}

{% endif %}
</div>

{% include 'admin/widgets/modal_search.html' with widget=widget %}