1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-25 11:37:22 +02:00

Adhere to parent clubs automatically, adhere to Kfet automatically when registering to the WEI

This commit is contained in:
Yohann D'ANELLO
2020-08-04 20:04:41 +02:00
parent 358691aaa9
commit a096dc4427
16 changed files with 588 additions and 266 deletions

View File

@ -15,6 +15,16 @@
$("#profile_infos").load("{% url 'wei:wei_detail' pk=object.pk %} #profile_infos");
}
window.history.replaceState({}, document.title, location.pathname);
$(document).ready(function() {
$(".no-perm").parent().addClass("d-none");
if ($("a[data-type='validate-membership']:not(.d-none)").length === 0) {
$("a[data-type='validate-membership']").parent().addClass("d-none");
$("#validate-membership-header").addClass("d-none");
}
if ($("a[data-type='delete-membership']:not(.d-none)").length === 0) {
$("a[data-type='delete-membership']").parent().addClass("d-none");
$("#delete-membership-header").addClass("d-none");
}
});
</script>
{% endblock %}

View File

@ -166,7 +166,9 @@
</div>
{% else %}
<div class="alert alert-success">
{% trans "The note has enough money, the registration is possible." %}
{% blocktrans trimmed with pretty_fee=fee|pretty_money %}
The note has enough money ({{ pretty_fee }} required), the registration is possible.
{% endblocktrans %}
</div>
{% endif %}
{% endif %}
@ -178,14 +180,12 @@
{% endif %}
{% if not kfet_member %}
<div class="alert alert-danger">
<div class="alert alert-warning">
{% url 'registration:future_user_detail' pk=registration.user.pk as future_user_detail %}
{% url 'member:club_detail' pk=club.parent_club.parent_club.pk as club_detail %}
{% blocktrans trimmed %}
This user is not a member of the Kfet club for the comming year. Please adhere
<a href="{{ future_user_detail }}">here if he/she is in her/his first year</a>
or <a href="{{ club_detail }}">here if he/she was an old member</a> before you validate
the registration of the WEI.
This user is not a member of the Kfet club for the coming year. The membership will be
processed automatically, the WEI registration includes the membership fee.
{% endblocktrans %}
</div>
{% endif %}

View File

@ -41,6 +41,16 @@
}
searchbar_obj.keyup(reloadTable);
$(".no-perm").parent().addClass("d-none");
if ($("a[data-type='validate-membership']:not(.d-none)").length === 0) {
$("a[data-type='validate-membership']").parent().addClass("d-none");
$("#validate-membership-header").addClass("d-none");
}
if ($("a[data-type='delete-membership']:not(.d-none)").length === 0) {
$("a[data-type='delete-membership']").parent().addClass("d-none");
$("#delete-membership-header").addClass("d-none");
}
});
</script>
{% endblock %}