mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-24 17:11:18 +00:00
Compare commits
No commits in common. "aa35724be259cf4299799271f89369553da406cc" and "43d214b9824b48c3414398f924a98251d74c5e4c" have entirely different histories.
aa35724be2
...
43d214b982
@ -108,7 +108,7 @@ class WEIRegistrationTable(tables.Table):
|
|||||||
}
|
}
|
||||||
model = WEIRegistration
|
model = WEIRegistration
|
||||||
template_name = 'django_tables2/bootstrap4.html'
|
template_name = 'django_tables2/bootstrap4.html'
|
||||||
fields = ('user', 'user__first_name', 'user__last_name', 'first_year', 'caution_check',)
|
fields = ('user', 'user__first_name', 'user__last_name', 'first_year',)
|
||||||
row_attrs = {
|
row_attrs = {
|
||||||
'class': 'table-row',
|
'class': 'table-row',
|
||||||
'id': lambda record: "row-" + str(record.pk),
|
'id': lambda record: "row-" + str(record.pk),
|
||||||
@ -147,7 +147,7 @@ class WEIMembershipTable(tables.Table):
|
|||||||
model = WEIMembership
|
model = WEIMembership
|
||||||
template_name = 'django_tables2/bootstrap4.html'
|
template_name = 'django_tables2/bootstrap4.html'
|
||||||
fields = ('user', 'user__last_name', 'user__first_name', 'registration__gender', 'user__profile__department',
|
fields = ('user', 'user__last_name', 'user__first_name', 'registration__gender', 'user__profile__department',
|
||||||
'year', 'bus', 'team', 'registration__caution_check', )
|
'year', 'bus', 'team', )
|
||||||
row_attrs = {
|
row_attrs = {
|
||||||
'class': 'table-row',
|
'class': 'table-row',
|
||||||
'id': lambda record: "row-" + str(record.pk),
|
'id': lambda record: "row-" + str(record.pk),
|
||||||
|
@ -6,8 +6,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
{% block profile_content %}
|
{% block profile_content %}
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
|
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -20,18 +18,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer text-center">
|
|
||||||
<a href="{% url 'wei:wei_registrations' pk=club.pk %}">
|
<a href="{% url 'wei:wei_registrations' pk=club.pk %}">
|
||||||
<button class="btn btn-block btn-info">{% trans "View unvalidated registrations..." %}</button>
|
<button class="btn btn-block btn-info">{% trans "View unvalidated registrations..." %}</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<a href="{% url 'wei:wei_memberships_pdf' wei_pk=club.pk %}" data-turbolinks="false">
|
<a href="{% url 'wei:wei_memberships_pdf' wei_pk=club.pk %}" data-turbolinks="false">
|
||||||
<button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
|
<button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrajavascript %}
|
{% block extrajavascript %}
|
||||||
|
@ -6,8 +6,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
{% block profile_content %}
|
{% block profile_content %}
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -20,14 +18,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer text-center">
|
|
||||||
<a href="{% url 'wei:wei_memberships' pk=club.pk %}">
|
<a href="{% url 'wei:wei_memberships' pk=club.pk %}">
|
||||||
<button class="btn btn-block btn-info">{% trans "View validated memberships..." %}</button>
|
<button class="btn btn-block btn-info">{% trans "View validated memberships..." %}</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrajavascript %}
|
{% block extrajavascript %}
|
||||||
|
@ -918,6 +918,10 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
|
|||||||
if credit_type is None or registration.soge_credit:
|
if credit_type is None or registration.soge_credit:
|
||||||
credit_amount = 0
|
credit_amount = 0
|
||||||
|
|
||||||
|
if not registration.caution_check and not registration.first_year:
|
||||||
|
form.add_error('bus', _("This user didn't give her/his caution check."))
|
||||||
|
return super().form_invalid(form)
|
||||||
|
|
||||||
if not registration.soge_credit and user.note.balance + credit_amount < fee:
|
if not registration.soge_credit and user.note.balance + credit_amount < fee:
|
||||||
# Users must have money before registering to the WEI.
|
# Users must have money before registering to the WEI.
|
||||||
form.add_error('bus',
|
form.add_error('bus',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user