billing: Add hint about support on the sponsorship pending page.

This just replaces the billing/upgrade with the statement that
"Your organization has requested sponsored or discounted hosting.", so
it should include an obvious contact in case the customer wants to amend
something or just bump a request that may have gotten missed.
This commit is contained in:
Mateusz Mandera 2023-02-13 20:49:56 +01:00 committed by Tim Abbott
parent 684430faa2
commit f482fc2a73
2 changed files with 25 additions and 0 deletions

View File

@ -2293,6 +2293,20 @@ class StripeTest(StripeTestCase):
self.assert_in_success_response( self.assert_in_success_response(
["Your organization has requested sponsored or discounted hosting."], response ["Your organization has requested sponsored or discounted hosting."], response
) )
self.assert_in_success_response(
[
'Please <a href="mailto:support@zulip.com">contact Zulip support</a> if you have any questions or concerns.'
],
response,
)
# Ensure that the other "contact support" footer is not displayed, since that would be
# duplicate.
self.assert_not_in_success_response(
[
'Contact <a href="mailto:support@zulip.com">support@zulip.com</a> for billing history.'
],
response,
)
self.login_user(self.example_user("othello")) self.login_user(self.example_user("othello"))
response = self.client_get("/billing/") response = self.client_get("/billing/")
@ -2309,6 +2323,12 @@ class StripeTest(StripeTestCase):
["Your organization is fully sponsored and is on the <b>Zulip Cloud Standard</b>"], ["Your organization is fully sponsored and is on the <b>Zulip Cloud Standard</b>"],
response, response,
) )
self.assert_in_success_response(
[
'Contact <a href="mailto:support@zulip.com">support@zulip.com</a> for billing history.'
],
response,
)
def test_redirect_for_billing_home(self) -> None: def test_redirect_for_billing_home(self) -> None:
user = self.example_user("iago") user = self.example_user("iago")

View File

@ -194,6 +194,8 @@
<div class="tab-content"> <div class="tab-content">
{% if sponsorship_pending %} {% if sponsorship_pending %}
<h3>Your organization has requested sponsored or discounted hosting.</h3> <h3>Your organization has requested sponsored or discounted hosting.</h3>
<br />
Please <a href="mailto:support@zulip.com">contact Zulip support</a> if you have any questions or concerns.
{% elif is_sponsored %} {% elif is_sponsored %}
<center> <center>
<p> <p>
@ -214,11 +216,14 @@
</center> </center>
{% endif %} {% endif %}
</div> </div>
{% if not sponsorship_pending %}
{# In the other case, we're displaying a different message about contacting support. #}
<div class="support-link"> <div class="support-link">
<p> <p>
Contact <a href="mailto:support@zulip.com">support@zulip.com</a> for billing history. Contact <a href="mailto:support@zulip.com">support@zulip.com</a> for billing history.
</p> </p>
</div> </div>
{% endif %}
{% else %} {% else %}
<p> <p>
You must be an organization owner or a billing administrator to view this page. You must be an organization owner or a billing administrator to view this page.