X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Fregistration_view.html;h=7ed1bd1135cb0763701d14d33a8c0bcce913b368;hb=88cc2d36009069514ab2c327a5c42a9e4592dc32;hp=b14e2d28704b3c5fcae1fbbb0e9ef363c02d17fc;hpb=7114aa9ee7ecf6e245c58b55c73eac455a6be53b;p=unfold.git diff --git a/portal/templates/registration_view.html b/portal/templates/registration_view.html index b14e2d28..7ed1bd11 100644 --- a/portal/templates/registration_view.html +++ b/portal/templates/registration_view.html @@ -114,9 +114,18 @@ jQuery(document).ready(function(){ {value:"",label:"No authority found !!!"} {% endif %} ]; - $( "#authority_hrn" ).autocomplete({ + jQuery( "#authority_hrn" ).autocomplete({ source: availableTags, - select: function( event, ui ) {console.log(jQuery(this))} + minLength: 0, + change: function (event, ui) { + if(!ui.item){ + //http://api.jqueryui.com/autocomplete/#event-change - + // The item selected from the menu, if any. Otherwise the property is null + //so clear the item for force selection + jQuery("#authority_hrn").val(""); + } + } + //select: function( event, ui ) {console.log(jQuery(this))} }); });