forked from DGNum/gestioCOF
registration est cassé
This commit is contained in:
parent
3cd618e60d
commit
34830f897e
5 changed files with 127 additions and 73 deletions
|
@ -799,36 +799,85 @@ input[type="text"], input[type=password] {
|
|||
|
||||
input#search_autocomplete {
|
||||
width: 600px;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
font-size: 18px;
|
||||
height: 40px;
|
||||
padding: 10px 8px;
|
||||
margin: 0 auto;
|
||||
margin-top: 20px;
|
||||
display: block;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
input#search_autocomplete:focus {
|
||||
font-size: 18px;
|
||||
color: #343a4a;
|
||||
}
|
||||
|
||||
.autocomplete {margin-bottom:5px;}
|
||||
.yourlabs-autocomplete ul {list-style-type: none; padding: 0; margin: 0; font-size: 1.5em;}
|
||||
.yourlabs-autocomplete li {padding: 6px 5px; display: block;}
|
||||
.yourlabs-autocomplete li a {text-decoration: none;}
|
||||
.yourlabs-autocomplete li a span.highlight {text-decoration: underline; font-weight: bold;}
|
||||
.yourlabs-autocomplete li.autocomplete-header {background-color: #FFEF9E; padding: 3px 5px; color: #000;}
|
||||
.yourlabs-autocomplete li.autocomplete-value {cursor: pointer;}
|
||||
.yourlabs-autocomplete li.hilight {background-color: #EA4839; color: #FFF; }
|
||||
.autocomplete {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li {
|
||||
padding: 6px 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li a span.highlight {
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li.autocomplete-header {
|
||||
background-color: #FFEF9E;
|
||||
padding: 3px 5px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li.autocomplete-value {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li.hilight {
|
||||
background-color: #EA4839;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete li.hilight a {color: #FFF; }
|
||||
.yourlabs-autocomplete { border: none; background: none; }
|
||||
.yourlabs-autocomplete.outer-container { position: relative; }
|
||||
.yourlabs-autocomplete.inner-container { position: absolute; left: -1px; top: 2px; border: 1px solid #B7B7B7; width: 618px; background: #fff; }
|
||||
.yourlabs-autocomplete.inner-container { margin: 0; padding: 0; overflow-x: hidden; overflow-y: auto; position: relative; list-style-type: none; }
|
||||
|
||||
.yourlabs-autocomplete.inner-container {
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 2px;
|
||||
border: 1px solid #B7B7B7;
|
||||
width: 618px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.yourlabs-autocomplete.inner-container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-color : #D4D6C8;
|
||||
}
|
||||
|
||||
/*
|
||||
hr {
|
||||
border: 0;
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
|
||||
<li><a href="{% url "gestioncof.views.profile" %}">Éditer mon profil</a></li>
|
||||
{% if not user.profile.login_clipper %}<li><a href="{% url "django.contrib.auth.views.password_change" %}">Changer mon mot de passe</a></li>{% endif %}
|
||||
<li><a href="{% url "gestioncof.views.logout" %}">Se déconnecter</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,34 +7,34 @@
|
|||
{% 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>
|
||||
<span class="yourlabs-autocomplete"></span>
|
||||
<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",
|
||||
container: $("#main-content"),
|
||||
box: $(".yourlabs-autocomplete"),
|
||||
fixPosition: function() {},
|
||||
});
|
||||
$('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>
|
||||
<h2>Inscription d'un nouveau membre</h2>
|
||||
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
|
||||
<div id="form-placeholder"></div>
|
||||
<span class="yourlabs-autocomplete"></span>
|
||||
<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",
|
||||
container: $("#main-content"),
|
||||
box: $(".yourlabs-autocomplete"),
|
||||
fixPosition: function() {},
|
||||
});
|
||||
$('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 %}
|
||||
|
|
|
@ -1,21 +1,27 @@
|
|||
{% 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 id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ user_form.as_table }}
|
||||
{{ profile_form.as_table }}
|
||||
{% if event_forms %}
|
||||
</table>
|
||||
{% for event_form in event_forms %}
|
||||
<hr />
|
||||
<h4>Inscription {{ event_form.event.title }} :</h2>
|
||||
<table>
|
||||
{{ event_form.as_table }}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if login_clipper or member %}<input type="hidden" name="user_exists" value="1" />{% endif %}
|
||||
<input type="submit" class="btn-submit" value="Enregistrer l'inscription" />
|
||||
</form>
|
||||
{% 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 id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ user_form.as_table }}
|
||||
{{ profile_form.as_table }}
|
||||
{% if event_forms %}
|
||||
</table>
|
||||
{% for event_form in event_forms %}
|
||||
<hr />
|
||||
<h4>Inscription {{ event_form.event.title }} :</h2>
|
||||
<table>
|
||||
{{ event_form.as_table }}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if login_clipper or member %}
|
||||
<input type="hidden" name="user_exists" value="1" />
|
||||
{% endif %}
|
||||
<input type="submit" class="btn-submit" value="Enregistrer l'inscription" />
|
||||
</form>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% 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 "registration_form.html" %}
|
||||
</div>
|
||||
<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 "registration_form.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue