git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6525a09
)
Enforce selection of an Authority in Registration
author
Loic Baron
<loic.baron@lip6.fr>
Thu, 16 Jan 2014 16:53:44 +0000
(17:53 +0100)
committer
Loic Baron
<loic.baron@lip6.fr>
Thu, 16 Jan 2014 16:53:44 +0000
(17:53 +0100)
portal/templates/registration_view.html
patch
|
blob
|
history
diff --git
a/portal/templates/registration_view.html
b/portal/templates/registration_view.html
index
b14e2d2
..
7ed1bd1
100644
(file)
--- 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 %}
];
{value:"",label:"No authority found !!!"}
{% endif %}
];
-
$
( "#authority_hrn" ).autocomplete({
+
jQuery
( "#authority_hrn" ).autocomplete({
source: availableTags,
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))}
});
});
</script>
});
});
</script>