1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 05:58:25 +02:00

Display payment information on the sidebar

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-02-11 23:31:24 +01:00
parent 672529382d
commit 850659bf48
3 changed files with 246 additions and 130 deletions

View File

@ -363,6 +363,29 @@ class StudentRegistration(ParticipantRegistration):
'content': content,
})
if self.team and self.team.participation.valid:
if self.payment.valid is False:
text = _("You have to pay {amount} € for your registration, or send a scholarship "
"notification or a payment proof. "
"You can do it on <a href=\"{url}\">the payment page</a>.")
url = reverse_lazy("registration:update_payment", args=(self.payment.id,))
content = format_lazy(text, amount=self.team.participation.tournament.price, url=url)
informations.append({
'title': _("Payment"),
'type': "danger",
'priority': 3,
'content': content,
})
elif self.payment.valid is None:
text = _("Your payment is under approval.")
content = text
informations.append({
'title': _("Payment"),
'type': "warning",
'priority': 3,
'content': content,
})
return informations
class Meta: