64b0546cc2
On utilise désormais les balises `{% load staticfiles %}` et `{% static ... %}` pour charger les fichiers au bon endroit.
36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
{% load staticfiles %}
|
|
{% extends "base_title.html" %}
|
|
|
|
{% block extra_head %}
|
|
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
|
|
<script src="{% static "autocomplete_light/autocomplete.js" %}" type="text/javascript"></script>
|
|
{% endblock %}
|
|
|
|
{% block realcontent %}
|
|
<h2>Inscription d'un nouveau membre</h2>
|
|
<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({
|
|
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
|
|
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>
|
|
{% endblock %}
|