{% load translate from i18n %}
{% spaceless %}
<select is="django-dual-selector" name="{{ widget.name }}" {% include "django/forms/widgets/attrs.html" %} hidden>
	{% for option in widget.options %}
	<option value="{{ option.value|stringformat:'s' }}"{% if option.selected %} selected{% endif %}>{{ option.label }}</option>
	{% endfor %}
</select>
{% block "select-no-results" %}
<template class="select-no-results">{% translate "No results found for '${input}'" %}</template>
{% endblock %}
{% block "select-extra-styles" %}{% endblock %}
{% with select_size=widget.attrs.size|default:8 %}
<div class="{% block "wrapper_classes" %}dj-dual-selector{% endblock %}">
{% block "left-column" %}
	<div class="{% block "column_left_classes" %}left-column{% endblock %}">
		<input type="text" class="dj-exempt-feedback{% if lookup_field_classes %} {{ lookup_field_classes }}{% endif %}" placeholder="{% translate 'Search …' %}" />
		<select multiple class="dj-exempt-feedback{% if select_classes %} {{ select_classes }}{% endif %}" size="{{ select_size }}"></select>
	</div>
{% endblock %}
{% block "control-panel" %}
	<div class="control-column">
		<div class="control-panel">
			{% include "formset/default/buttons/move_all_right.html" %}
			{% include "formset/default/buttons/move_selected_right.html" %}
			{% include "formset/default/buttons/move_selected_left.html" %}
			{% include "formset/default/buttons/move_all_left.html" %}
			{% include "formset/default/buttons/undo_selected.html" %}
			{% include "formset/default/buttons/redo_selected.html" %}
		</div>
	</div>
{% endblock %}
{% block "right-column" %}
	<div class="{% block "column_right_classes" %}right-column{% endblock %}">
		<input type="text" class="dj-exempt-feedback{% if lookup_field_classes %} {{ lookup_field_classes }}{% endif %}" placeholder="{% translate 'Search …' %}" />
	{% if is_sortable %}
		<django-sortable-select{% if select_classes %} class="{{ select_classes }}"{% endif %} size="{{ select_size }}"></django-sortable-select>
	{% else %}
		<select multiple class="dj-exempt-feedback{% if select_classes %} {{ select_classes }}{% endif %}" size="{{ select_size }}"></select>
	{% endif %}
	</div>
{% endblock %}
</div>
{% endwith %}
{% endspaceless %}