{% if bootstrap %}{% include "ajax_select/bootstrap.html" %}{% endif %}
<span id="{{ html_id }}_wrapper">
<input type="text" name="{{name}}_text" id="{{html_id}}_text" value="" {{ extra_attrs }} />
{% if add_link %}
	<a href="{{ add_link }}" class="add-another addlink" id="add_{{ html_id }}" onclick="return showAddAnotherPopup(this);"> add</a>
{% endif %}
<input type="hidden" name="{{name}}" id="{{html_id}}" value="{{current_id}}" />
<div id="{{html_id}}_on_deck" class="results_on_deck"><div>{{current_repr|safe}}</div></div>
<script type="text/javascript">//<![CDATA[
jQuery(document).ready(function($){
	addAutoComplete("{{html_id}}", function(html_id) {
		$("#"+html_id).autocompleteselect({{ plugin_options }});
	});
{% block extra_script %}{% endblock %}
});//]]>
</script>
{% block help %}{% if help_text %}<p class="help">{{help_text}}</p>{% endif %}{% endblock %}
</span>
{{ inline }}
