From 3bf2654b50e068bfbf1386077ecdc4346705185d Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 15 Nov 2019 19:45:35 +0530 Subject: [PATCH] Update ProductPaymentForm for yearly subscription --- hosting/forms.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosting/forms.py b/hosting/forms.py index d98d258f..947cee44 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -109,9 +109,14 @@ class ProductPaymentForm(GenericPaymentForm): ) ) if self.product.product_is_subscription: + payment_type = "month" + if self.product.product_subscription_interval == "month": + payment_type = _('Monthly subscription') + elif self.product.product_subscription_interval == "year": + payment_type = _('Yearly subscription') self.fields['amount'].label = "{amt} ({payment_type})".format( amt=_('Amount in CHF'), - payment_type=_('Monthly subscription') + payment_type=payment_type ) else: self.fields['amount'].label = "{amt} ({payment_type})".format(