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 {
|
input#search_autocomplete {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
height: 20px;
|
height: 40px;
|
||||||
padding: 10px 8px;
|
padding: 10px 8px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
margin-top: 20px;
|
||||||
display: block;
|
display: block;
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
input#search_autocomplete:focus {
|
input#search_autocomplete:focus {
|
||||||
font-size: 18px;
|
|
||||||
color: #343a4a;
|
color: #343a4a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete {margin-bottom:5px;}
|
.autocomplete {
|
||||||
.yourlabs-autocomplete ul {list-style-type: none; padding: 0; margin: 0; font-size: 1.5em;}
|
margin-bottom:5px;
|
||||||
.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 ul {
|
||||||
.yourlabs-autocomplete li.autocomplete-header {background-color: #FFEF9E; padding: 3px 5px; color: #000;}
|
list-style-type: none;
|
||||||
.yourlabs-autocomplete li.autocomplete-value {cursor: pointer;}
|
padding: 0;
|
||||||
.yourlabs-autocomplete li.hilight {background-color: #EA4839; color: #FFF; }
|
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 li.hilight a {color: #FFF; }
|
||||||
.yourlabs-autocomplete { border: none; background: none; }
|
.yourlabs-autocomplete { border: none; background: none; }
|
||||||
.yourlabs-autocomplete.outer-container { position: relative; }
|
.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 {
|
hr {
|
||||||
border-color : #D4D6C8;
|
border-color : #D4D6C8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
hr {
|
hr {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
|
@ -55,7 +55,6 @@
|
||||||
|
|
||||||
<li><a href="{% url "gestioncof.views.profile" %}">Éditer mon profil</a></li>
|
<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 %}
|
{% 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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,34 +7,34 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Inscription d'un nouveau membre</h2>
|
<h2>Inscription d'un nouveau membre</h2>
|
||||||
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
|
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
|
||||||
<div id="form-placeholder"></div>
|
<div id="form-placeholder"></div>
|
||||||
<span class="yourlabs-autocomplete"></span>
|
<span class="yourlabs-autocomplete"></span>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input#search_autocomplete').yourlabsAutocomplete({
|
$('input#search_autocomplete').yourlabsAutocomplete({
|
||||||
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
|
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
|
||||||
minimumCharacters: 1,
|
minimumCharacters: 1,
|
||||||
id: 'search_autocomplete',
|
id: 'search_autocomplete',
|
||||||
choiceSelector: 'li:has(a)',
|
choiceSelector: 'li:has(a)',
|
||||||
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
|
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
|
||||||
container: $("#main-content"),
|
container: $("#main-content"),
|
||||||
box: $(".yourlabs-autocomplete"),
|
box: $(".yourlabs-autocomplete"),
|
||||||
fixPosition: function() {},
|
fixPosition: function() {},
|
||||||
});
|
});
|
||||||
$('input#search_autocomplete').bind(
|
$('input#search_autocomplete').bind(
|
||||||
'selectChoice',
|
'selectChoice',
|
||||||
function(e, choice, autocomplete) {
|
function(e, choice, autocomplete) {
|
||||||
autocomplete.hide();
|
autocomplete.hide();
|
||||||
link = choice.find('a:first');
|
link = choice.find('a:first');
|
||||||
if (link.length && link.attr('href') != undefined) {
|
if (link.length && link.attr('href') != undefined) {
|
||||||
$('#form-placeholder').html("").load(link.attr('href'), function() {
|
$('#form-placeholder').html("").load(link.attr('href'), function() {
|
||||||
$('#form-placeholder').toggle().toggle();
|
$('#form-placeholder').toggle().toggle();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,21 +1,27 @@
|
||||||
{% if login_clipper %}<h3>Inscription associée au compte clipper <tt>{{ login_clipper }}</tt></h3>
|
{% if login_clipper %}
|
||||||
{% elif member %}<h3>Inscription du compte GestioCOF existant <tt>{{ member.username }}</tt></h3>
|
<h3>Inscription associée au compte clipper <tt>{{ login_clipper }}</tt></h3>
|
||||||
{% else %}<h3>Inscription d'un nouveau compte (extérieur ?)</h3>{% endif %}
|
{% elif member %}
|
||||||
<form id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
|
<h3>Inscription du compte GestioCOF existant <tt>{{ member.username }}</tt></h3>
|
||||||
{% csrf_token %}
|
{% else %}
|
||||||
<table>
|
<h3>Inscription d'un nouveau compte (extérieur ?)</h3>
|
||||||
{{ user_form.as_table }}
|
{% endif %}
|
||||||
{{ profile_form.as_table }}
|
<form id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
|
||||||
{% if event_forms %}
|
{% csrf_token %}
|
||||||
</table>
|
<table>
|
||||||
{% for event_form in event_forms %}
|
{{ user_form.as_table }}
|
||||||
<hr />
|
{{ profile_form.as_table }}
|
||||||
<h4>Inscription {{ event_form.event.title }} :</h2>
|
{% if event_forms %}
|
||||||
<table>
|
</table>
|
||||||
{{ event_form.as_table }}
|
{% for event_form in event_forms %}
|
||||||
</table>
|
<hr />
|
||||||
{% endfor %}
|
<h4>Inscription {{ event_form.event.title }} :</h2>
|
||||||
{% endif %}
|
<table>
|
||||||
{% if login_clipper or member %}<input type="hidden" name="user_exists" value="1" />{% endif %}
|
{{ event_form.as_table }}
|
||||||
<input type="submit" class="btn-submit" value="Enregistrer l'inscription" />
|
</table>
|
||||||
</form>
|
{% 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" %}
|
{% extends "base_title.html" %}
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Inscription d'un nouveau membre</h2>
|
<h2>Inscription d'un nouveau membre</h2>
|
||||||
{% if success %}
|
{% 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.
|
<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>
|
{% if member.profile.is_cof %}Il est désormais membre du COF n°{{ member.profile.num }} !{% endif %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id="form-placeholder">
|
<div id="form-placeholder">
|
||||||
{% include "registration_form.html" %}
|
{% include "registration_form.html" %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue