billing: Minor adjustments across the billing system.

* Reformat "This is a legacy plan" notice on billing page.
* Add a link to the plan name on upgrade page title.
* Tweak discount style on billing page.
* Add line break to server login page title.
* Match server login page title and tab title.
This commit is contained in:
Aman Agrawal 2023-12-08 09:14:27 +00:00 committed by Tim Abbott
parent 76d9aff5a6
commit 12dec4234e
5 changed files with 19 additions and 14 deletions

View File

@ -360,7 +360,9 @@ class LegacyServerLoginTest(BouncerTestCase):
def test_server_login_get(self) -> None:
result = self.client_get("/serverlogin/", subdomain="selfhosting")
self.assertEqual(result.status_code, 200)
self.assert_in_success_response(["Zulip server billing management"], result)
self.assert_in_success_response(
["Authenticate server for Zulip billing management"], result
)
def test_server_login_invalid_server_org_id(self) -> None:
result = self.client_post(
@ -423,9 +425,7 @@ class LegacyServerLoginTest(BouncerTestCase):
# Access on the upgrade page is granted, assert a basic string proving that.
result = self.client_get(result["Location"], subdomain="selfhosting")
self.assert_in_success_response(
[f"Upgrade {self.server.hostname} to Zulip Business"], result
)
self.assert_in_success_response([f"Upgrade {self.server.hostname}"], result)
def test_server_login_success_with_next_page(self) -> None:
# First test an invalid next_page value.
@ -502,9 +502,7 @@ class LegacyServerLoginTest(BouncerTestCase):
# Sanity check: access on the upgrade page is granted.
result = self.client_get(result["Location"], subdomain="selfhosting")
self.assert_in_success_response(
[f"Upgrade {self.server.hostname} to Zulip Business"], result
)
self.assert_in_success_response([f"Upgrade {self.server.hostname}"], result)
# Now we can simulate an expired identity dict in the session.
with time_machine.travel(

View File

@ -50,9 +50,9 @@
</div>
</div>
{% if is_server_on_legacy_plan %}
<div class="input-box billing-page-field no-validation">
<div class="input-box billing-page-field no-validation" id="legacy-server-push-notification-notice-wrapper">
<div id="legacy-server-push-notification-notice" class="not-editable-realm-field">
<i>This is a legacy plan that ends on {{ remote_server_legacy_plan_end_date }}</i>
<i>This is a legacy plan that ends on {{ remote_server_legacy_plan_end_date }}.</i>
</div>
</div>
{% endif %}
@ -200,7 +200,7 @@
{% endif %})
{% if discount_percent %}
<br />
<i class="billing-page-discount">(includes {{ discount_percent }}% discount)</i>
<i class="billing-page-discount">Includes {{ discount_percent }}% discount.</i>
{% endif %}
{% endif %}
{% endif %}

View File

@ -1,14 +1,14 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "upgrade" %}
{% set PAGE_TITLE = "Zulip server billing management" %}
{% set PAGE_TITLE = "Authenticate server for Zulip billing management" %}
{% block portico_content %}
<div id="server-login-page" class="register-account flex full-page">
<div class="center-block new-style">
<div class="pitch">
<h1>Authenticate server for Zulip billing management</h1>
<h1>Authenticate server<br/>for Zulip billing management</h1>
</div>
<div class="white-box">
<div id="server-login-page-details">

View File

@ -16,10 +16,13 @@
<div class="pitch">
<h1>
{% if free_trial_days %}
Start free trial of {{ plan }}
Start free trial of
{% else %}
Upgrade {{ customer_name }} to {{ plan }}
Upgrade {{ customer_name }} to
{% endif %}
<a href="{{ page_params.billing_base_url }}/plans/">
{{ plan }}
</a>
</h1>
</div>
<div class="white-box">

View File

@ -693,3 +693,7 @@ input[name="licenses"] {
width: 450px;
margin: 30px auto 0;
}
#billing-page-details #legacy-server-push-notification-notice-wrapper {
margin-top: 10px;
}