2016-05-26 01:09:31 +02:00
|
|
|
{% load staticfiles %}
|
2012-07-11 17:39:20 +02:00
|
|
|
{% extends "base_title.html" %}
|
|
|
|
|
2013-09-05 22:20:52 +02:00
|
|
|
{% block extra_head %}
|
2016-05-26 01:09:31 +02:00
|
|
|
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
|
|
|
|
<script src="{% static "autocomplete_light/autocomplete.js" %}" type="text/javascript"></script>
|
2013-09-05 22:20:52 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2012-07-11 17:39:20 +02:00
|
|
|
{% block realcontent %}
|
|
|
|
<h2>Inscription d'un nouveau membre</h2>
|
2013-09-05 22:20:52 +02:00
|
|
|
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
|
|
|
|
<div id="form-placeholder"></div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('input#search_autocomplete').yourlabsAutocomplete({
|
2013-09-05 22:22:47 +02:00
|
|
|
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
|
2013-09-05 22:20:52 +02:00
|
|
|
minimumCharacters: 1,
|
|
|
|
id: 'search_autocomplete',
|
|
|
|
choiceSelector: 'li:has(a)',
|
|
|
|
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
|
|
|
|
});
|
|
|
|
$('input#search_autocomplete').bind(
|
|
|
|
'selectChoice',
|
|
|
|
function(e, choice, autocomplete) {
|
|
|
|
autocomplete.hide();
|
|
|
|
link = choice.find('a:first');
|
|
|
|
if (link.length && link.attr('href') != undefined) {
|
|
|
|
$('#form-placeholder').html("").load(link.attr('href'), function() {
|
|
|
|
$('#form-placeholder').toggle().toggle();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
</script>
|
2012-07-11 17:39:20 +02:00
|
|
|
{% endblock %}
|