{% load i18n %}

<div class="relate single {% if not value %}empty{% endif %}">
  <div class="multiple-search">
    <input type="search" id="id-{{ name }}" name="{{ name }}" 
           class="autocomplete"
           value=""
           data-search_minlength="{{ search_minlength }}"
           data-search_url="{{ search_url }}"
           placeholder="{{ hint }}">

    <input type="hidden" name="{{ name }}_add" 
           value="{% if initial %}{{ value.value }}{% endif %}"
           class="add-list {% if initial %}initial{% endif %}" />

    <div class="searchresults ui-front"></div>

  </div>

  <ul class="related">
    <li class="tpl" style="display: none">
      <span href="#">label</span> 
      <a href="#" data-urn="value" 
         class="change related-option">
        {% trans "Change" %}
      </a>
    </li>
    {% if value %}
    <li>
      <span href="#">{{ value.label }}</span> 
      <a href="#" data-urn="{{ value.value }}" 
         class="change related-option">
        {% comment %}Translators: relate widget change relation{% endcomment %}
        {% trans "Change" %}
      </a>
    </li>
    {% endif %}
  </ul>
</div>
