Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
portico: Pass requested sponsorship context to plan page.
Aman Agrawal45a2f7eac135
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex 2ebadd49e6f..a026bac3927 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -2354,7 +2354,7 @@ class BillingSession(ABC):): # nocoveragereturn sponsorship_request.requested_plan- # We only support sponsorships for these plans.+ # Default name for sponsorship plan.sponsored_plan_name = CustomerPlan.name_from_tier(CustomerPlan.TIER_CLOUD_STANDARD)if is_remotely_hosted:sponsored_plan_name = CustomerPlan.name_from_tier(diff --git a/corporate/views/portico.py b/corporate/views/portico.pyindex 473cb1a7437..05b43ead76d 100644--- a/corporate/views/portico.py+++ b/corporate/views/portico.py@@ -80,6 +80,7 @@ class PlansPageContext:customer_plan: Optional[CustomerPlan] = Noneis_legacy_server_with_scheduled_upgrade: bool = Falselegacy_server_new_plan: Optional[CustomerPlan] = None+ requested_sponsorship_plan: Optional[str] = Nonebilling_base_url: str = ""@@ -140,6 +141,7 @@ def remote_realm_plans_page(free_trial_days=get_free_trial_days(True),billing_base_url=billing_session.billing_base_url,is_sponsored=billing_session.is_sponsored(),+ requested_sponsorship_plan=billing_session.get_sponsorship_plan_name(customer, True),)context.on_free_tier = customer is None and not context.is_sponsored@@ -192,6 +194,7 @@ def remote_server_plans_page(free_trial_days=get_free_trial_days(True),billing_base_url=billing_session.billing_base_url,is_sponsored=billing_session.is_sponsored(),+ requested_sponsorship_plan=billing_session.get_sponsorship_plan_name(customer, True),)context.on_free_tier = customer is None and not context.is_sponsored