+<script>
+jQuery(document).ready(function(){
+ var availableTags = [
+ {% if authorities %}
+ {% for authority in authorities %}
+ {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
+ {% endfor %}
+ {% else %}
+ {value:"",label:"No authority found !!!"}
+ {% endif %}
+ ];
+ $( "#auth_list" ).autocomplete({
+ source: availableTags,
+ select: function( event, ui ) {console.log(jQuery(this))}
+ });
+});
+</script>