{% load static %} {% load autocomplete %} {% comment %} This is the main component template that creates the basic HTML structure. {% endcomment %}
{% comment %} Hidden input elements used to maintain the component's state {% endcomment %} {% comment %} and used when submitting forms {% endcomment %}
{% include "./values.html" %}
{% comment %} Data element used to store component state data {% endcomment %} {% if label is not None %} {% endif %} {% include "./ac_container.html" %}
{% comment %} This region provides contextual information for screen readers {% endcomment %}
{% if selected_items|length > 0 %} {% for item in selected_items %} {% with item=item.label %} {% use_string "item_selected" custom_strings %} {% endwith %} {% endfor %} {% else %} {% use_string "nothing_selected" custom_strings %} {% endif %}
{% comment %} This div provides screen readers information about selected items {% endcomment %} {% if multiselect %}
{% if selected_items|length > 0 %} {{ selected_items|length }} {% use_string "selected" custom_strings %} {% for item in selected_items %} {% with item=item.label %} {% use_string "item_selected" custom_strings %} {% endwith %} {% endfor %} {% use_string "backspace_instruction" custom_strings %} {% endif %}
{% endif %}
{% comment %} This code snippet loads the required CSS and JS if not already loaded. {% endcomment %}