mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-24 19:20:29 +02:00
Add WEI form on signup form
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load crispy_forms_tags%}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/section ...">
|
||||
|
||||
@ -11,7 +13,7 @@
|
||||
{% render_table table %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "There is no pending user with this pattern." %}
|
||||
{% trans "There is no user with this pattern." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% block content %}
|
||||
{% if validlink %}
|
||||
{% trans "Your email have successfully been validated." %}
|
||||
{% if user.profile.registration_valid %}
|
||||
{% if user_object.profile.registration_valid %}
|
||||
{% blocktrans %}You can now <a href="{{ login_url }}">log in</a>.{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans "You must pay now your membership in the Kfet to complete your registration." %}
|
||||
|
@ -5,13 +5,47 @@
|
||||
{% block title %}{% trans "Sign up" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Sign up" %}</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ profile_form|crispy }}
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Sign up" %}
|
||||
</button>
|
||||
</form>
|
||||
<h2>{% trans "Sign up" %}</h2>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans %}
|
||||
If you already signed up, your registration is taken into account. The BDE must validate your account before
|
||||
your can log in. You have to go to the Kfet and pay the registration fee. You must also validate your email
|
||||
address by following the link you received. If you forgot to register to the WEI, then you can pre-register
|
||||
to the WEI after your account get validated, so please go to the Kfet.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ profile_form|crispy }}
|
||||
{{ wei_registration_form|crispy }}
|
||||
<div id="wei_form_div" class="d-none">
|
||||
{{ wei_form|crispy }}
|
||||
</div>
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Sign up" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$("#id_wei_registration").change(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#wei_form_div").removeClass('d-none');
|
||||
$("#wei_form_div .form-control").removeAttr('disabled');
|
||||
}
|
||||
else {
|
||||
$("#wei_form_div").addClass('d-none');
|
||||
$("#wei_form_div .form-control").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
if ($("#id_wei_registration").is(":checked")) {
|
||||
$("#wei_form_div").removeClass('d-none');
|
||||
$("#wei_form_div .form-control").removeAttr('disabled');
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user