mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-27 02:55:25 +02:00
Fixed 1A forms
This commit is contained in:
@ -149,6 +149,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<li>{% blocktrans trimmed with amount=fee|pretty_money %}
|
<li>{% blocktrans trimmed with amount=fee|pretty_money %}
|
||||||
Membership fees: {{ amount }}
|
Membership fees: {{ amount }}
|
||||||
{% endblocktrans %}</li>
|
{% endblocktrans %}</li>
|
||||||
|
{% if not registration.first_year %}
|
||||||
{% if registration.deposit_type == 'note' %}
|
{% if registration.deposit_type == 'note' %}
|
||||||
<li>{% blocktrans trimmed with amount=club.deposit_amount|pretty_money %}
|
<li>{% blocktrans trimmed with amount=club.deposit_amount|pretty_money %}
|
||||||
Deposit (by Note transaction): {{ amount }}
|
Deposit (by Note transaction): {{ amount }}
|
||||||
@ -158,6 +159,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
Deposit (by check): {{ amount }}
|
Deposit (by check): {{ amount }}
|
||||||
{% endblocktrans %}</li>
|
{% endblocktrans %}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
<li><strong>{% blocktrans trimmed with total=total_needed|pretty_money %}
|
<li><strong>{% blocktrans trimmed with total=total_needed|pretty_money %}
|
||||||
Total needed: {{ total }}
|
Total needed: {{ total }}
|
||||||
{% endblocktrans %}</strong></li>
|
{% endblocktrans %}</strong></li>
|
||||||
|
@ -816,9 +816,12 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
|||||||
del form.fields["deposit_check"]
|
del form.fields["deposit_check"]
|
||||||
|
|
||||||
# S'assurer que le champ deposit_type est obligatoire pour les 2A+
|
# S'assurer que le champ deposit_type est obligatoire pour les 2A+
|
||||||
if not self.object.first_year and "deposit_type" in form.fields:
|
if "deposit_type" in form.fields:
|
||||||
form.fields["deposit_type"].required = True
|
if self.object.first_year:
|
||||||
form.fields["deposit_type"].help_text = _("Choose how you want to pay the deposit")
|
del form.fields["deposit_type"]
|
||||||
|
else:
|
||||||
|
form.fields["deposit_type"].required = True
|
||||||
|
form.fields["deposit_type"].help_text = _("Choose how you want to pay the deposit")
|
||||||
|
|
||||||
return form
|
return form
|
||||||
|
|
||||||
@ -879,7 +882,6 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
|||||||
information["preferred_roles_name"] = [role.name for role in choose_bus_form.cleaned_data["roles"]]
|
information["preferred_roles_name"] = [role.name for role in choose_bus_form.cleaned_data["roles"]]
|
||||||
form.instance.information = information
|
form.instance.information = information
|
||||||
|
|
||||||
# Sauvegarder le type de caution pour les 2A+
|
|
||||||
if "deposit_type" in form.cleaned_data:
|
if "deposit_type" in form.cleaned_data:
|
||||||
form.instance.deposit_type = form.cleaned_data["deposit_type"]
|
form.instance.deposit_type = form.cleaned_data["deposit_type"]
|
||||||
form.instance.save()
|
form.instance.save()
|
||||||
|
Reference in New Issue
Block a user