diff --git a/analytics/views/support.py b/analytics/views/support.py index cfcad36e67..b9e91cfc05 100644 --- a/analytics/views/support.py +++ b/analytics/views/support.py @@ -76,7 +76,9 @@ def get_plan_type_string(plan_type: int) -> str: Realm.PLAN_TYPE_STANDARD_FREE: "Standard free", Realm.PLAN_TYPE_PLUS: "Plus", RemoteZulipServer.PLAN_TYPE_SELF_MANAGED: "Self-managed", - RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: "Self-managed (legacy)", + RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: CustomerPlan.name_from_tier( + CustomerPlan.TIER_SELF_HOSTED_LEGACY + ), RemoteZulipServer.PLAN_TYPE_COMMUNITY: "Community", RemoteZulipServer.PLAN_TYPE_BUSINESS: "Business", RemoteZulipServer.PLAN_TYPE_ENTERPRISE: "Enterprise", diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index 52774317de..28f40bd0e6 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -2408,6 +2408,9 @@ class BillingSession(ABC): if plan is not None: context["plan_name"] = plan.name context["free_trial"] = plan.is_free_trial() + context["is_server_on_legacy_plan"] = ( + plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY + ) self.add_sponsorship_info_to_context(context) return context diff --git a/corporate/models.py b/corporate/models.py index 3b46b22697..ce5626a18d 100644 --- a/corporate/models.py +++ b/corporate/models.py @@ -298,7 +298,7 @@ class CustomerPlan(models.Model): CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard", CustomerPlan.TIER_CLOUD_PLUS: "Zulip Cloud Plus", CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise", - CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed", + CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed (legacy plan)", CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Business", CustomerPlan.TIER_SELF_HOSTED_COMMUNITY: "Community", }[tier] diff --git a/templates/corporate/billing.html b/templates/corporate/billing.html index aee107d9d6..0d46da55b4 100644 --- a/templates/corporate/billing.html +++ b/templates/corporate/billing.html @@ -50,7 +50,7 @@ {% elif is_server_on_legacy_plan %} - {{ plan_name }} + {{ plan_name.replace(" (legacy plan)", "") -}} (legacy plan) {% else %} diff --git a/templates/corporate/sponsorship.html b/templates/corporate/sponsorship.html index 9494ddcbfe..ff698cca90 100644 --- a/templates/corporate/sponsorship.html +++ b/templates/corporate/sponsorship.html @@ -53,11 +53,21 @@