{% extends 'ef_basic_input.html' %}

{% block input %}
	<select name="{{ field.name }}" id="{{ field.id }}" class="{{ field.input_classes }}" {% if field.readonly %}readonly{% endif %}>
		{% if field.empty_option %}
			<option value="" {% if field.value == None %}selected="selected"{% endif %}>
				{{ field.empty_option_name }}
			</option>
		{% endif %}
		{% for key_pair in field.key_pairs %}
			<option value="{{ key_pair.select_value }}"
					{% if field.value == key_pair.select_value or field.value == key_pair %}selected="selected"{% endif %}>
				{{ key_pair.select_name }}
			</option>
		{% endfor %}
	</select>
{% endblock %}

