Generic registration view
This commit is contained in:
parent
f93a68b942
commit
0f491ef396
6 changed files with 200 additions and 19 deletions
|
@ -1,32 +0,0 @@
|
|||
{% load bootstrap %}
|
||||
|
||||
{% if login_clipper %}
|
||||
<h3>Inscription associée au compte clipper <tt>{{ login_clipper }}</tt></h3>
|
||||
{% elif member %}
|
||||
<h3>Inscription du compte GestioCOF existant <tt>{{ member.username }}</tt></h3>
|
||||
{% else %}
|
||||
<h3>Inscription d'un nouveau compte (extérieur ?)</h3>
|
||||
{% endif %}
|
||||
<form role="form" id="profile" method="post" action="{% url 'registration' %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ user_form | bootstrap }}
|
||||
{{ profile_form | bootstrap }}
|
||||
</table>
|
||||
<hr />
|
||||
<table>
|
||||
{{ cofprofile_form | bootstrap }}
|
||||
</table>
|
||||
{{ event_formset.management_form }}
|
||||
{% for event_form in event_formset %}
|
||||
<hr />
|
||||
<h3>Inscription {{ event_form.event.title }} :</h3>
|
||||
<table>
|
||||
{{ event_form | bootstrap }}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% if login_clipper or member %}
|
||||
<input type="hidden" name="user_exists" value="1" />
|
||||
{% endif %}
|
||||
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer l'inscription" />
|
||||
</form>
|
|
@ -1,12 +0,0 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Inscription d'un nouveau membre</h2>
|
||||
{% if success %}
|
||||
<p class="success">L'inscription de {{ member.first_name }} {{ member.last_name }} (<tt>{{ member.username }}</tt>) a été enregistrée avec succès.
|
||||
{% if member.profile.is_cof %}Il est désormais membre du COF n°{{ member.profile.num }} !{% endif %}</p>
|
||||
{% endif %}
|
||||
<div id="form-placeholder">
|
||||
{% include "cof/registration_form.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,40 +0,0 @@
|
|||
{% extends "base_title.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block page_size %}col-sm-8{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<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>
|
||||
<div class="yourlabs-autocomplete"></div>
|
||||
<script type="text/javascript">
|
||||
// On attend que la page soit prête pour executer le code
|
||||
$(document).ready(function() {
|
||||
$('input#search_autocomplete').yourlabsAutocomplete({
|
||||
url: '{% url 'autocomplete' %}',
|
||||
minimumCharacters: 3,
|
||||
id: 'search_autocomplete',
|
||||
choiceSelector: 'li:has(a)',
|
||||
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
|
||||
box: $(".yourlabs-autocomplete"),
|
||||
});
|
||||
$('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 %}
|
Loading…
Add table
Add a link
Reference in a new issue