diff --git a/corporate/tests/test_support_views.py b/corporate/tests/test_support_views.py index cddade7997..4bf8b34862 100644 --- a/corporate/tests/test_support_views.py +++ b/corporate/tests/test_support_views.py @@ -622,13 +622,13 @@ class TestSupportEndpoint(ZulipTestCase): ) -> None: self.assert_in_success_response( [ - 'preregistration user\n', + 'confirmation\n', f"Email: {email}", ], result, ) if invite: - self.assert_in_success_response(['invite'], result) + self.assert_in_success_response(["

Invite

"], result) self.assert_in_success_response( [ "Expires in: 1\xa0week, 3\xa0days", @@ -638,7 +638,7 @@ class TestSupportEndpoint(ZulipTestCase): ) self.assert_in_success_response([], result) else: - self.assert_not_in_success_response(['invite'], result) + self.assert_not_in_success_response(["

Invite

"], result) self.assert_in_success_response( [ "Expires in: 1\xa0day", @@ -650,8 +650,8 @@ class TestSupportEndpoint(ZulipTestCase): def check_realm_creation_query_result(result: "TestHttpResponse", email: str) -> None: self.assert_in_success_response( [ - 'preregistration user\n', - 'realm creation\n', + 'confirmation\n', + "

Realm creation

\n", "Link: http://testserver/accounts/do_confirm/", "Expires in: 1\xa0day", ], @@ -661,7 +661,8 @@ class TestSupportEndpoint(ZulipTestCase): def check_multiuse_invite_link_query_result(result: "TestHttpResponse") -> None: self.assert_in_success_response( [ - 'multiuse invite\n', + 'confirmation\n', + "

Multiuse invite

\n", "Link: http://zulip.testserver/join/", "Expires in: 1\xa0week, 3\xa0days", ], @@ -671,7 +672,8 @@ class TestSupportEndpoint(ZulipTestCase): def check_realm_reactivation_link_query_result(result: "TestHttpResponse") -> None: self.assert_in_success_response( [ - 'realm reactivation\n', + 'confirmation\n', + "

Realm reactivation

\n", "Link: http://zulip.testserver/reactivate/", "Expires in: 1\xa0day", ], diff --git a/templates/corporate/support/support.html b/templates/corporate/support/support.html index 8ef79ee393..a0a1594536 100644 --- a/templates/corporate/support/support.html +++ b/templates/corporate/support/support.html @@ -70,62 +70,60 @@ {% for confirmation in confirmations %} {% set object = confirmation.object %} -
- {% if confirmation.type == Confirmation.USER_REGISTRATION %} - preregistration user - {% set email = object.email %} - {% set realm = object.realm %} - {% set show_realm_details = True %} - {% elif confirmation.type == Confirmation.REALM_CREATION %} - preregistration user - realm creation - {% set email = object.email %} - {% set show_realm_details = False %} - {% elif confirmation.type == Confirmation.INVITATION %} - preregistration user - invite - {% set email = object.email %} - {% set realm = object.realm %} - {% set show_realm_details = True %} - {% elif confirmation.type == Confirmation.MULTIUSE_INVITE %} - multiuse invite - {% set realm = object.realm %} - {% set show_realm_details = False %} - {% elif confirmation.type == Confirmation.REALM_REACTIVATION %} - realm reactivation - {% set realm = object %} - {% set show_realm_details = False %} - {% endif %} -
-
- {% if email %} - Email: {{ email }}
- {% endif %} - Link: {{ confirmation.url }} - - -
- Expires in: {{ confirmation.expires_in }}
- {% if confirmation.link_status %} - Status: {{ confirmation.link_status }} - {% endif %} -
- {% if show_realm_details %} -
-
- {% with %} - {% set format_discount = format_discount %} - {% set dollar_amount = dollar_amount %} - {% include "corporate/support/realm_details.html" %} - {% endwith %} +
+
+ confirmation + {% if confirmation.type == Confirmation.USER_REGISTRATION %} +

Pre-registration user

+ {% set email = object.email %} + {% set realm = object.realm %} + {% set show_realm_details = True %} + {% elif confirmation.type == Confirmation.REALM_CREATION %} +

Realm creation

+ {% set email = object.email %} + {% set show_realm_details = False %} + {% elif confirmation.type == Confirmation.INVITATION %} +

Invite

+ {% set email = object.email %} + {% set realm = object.realm %} + {% set show_realm_details = True %} + {% elif confirmation.type == Confirmation.MULTIUSE_INVITE %} +

Multiuse invite

+ {% set realm = object.realm %} + {% set show_realm_details = False %} + {% elif confirmation.type == Confirmation.REALM_REACTIVATION %} +

Realm reactivation

+ {% set realm = object %} + {% set show_realm_details = False %} + {% endif %} + {% if email %} + Email: {{ email }}
+ {% endif %} + Link: {{ confirmation.url }} + + +
+ Expires in: {{ confirmation.expires_in }}
+ {% if confirmation.link_status %} + Status: {{ confirmation.link_status }}
+ {% endif %} +
+
+ {% if show_realm_details %} + {% with %} + {% set format_discount = format_discount %} + {% set dollar_amount = dollar_amount %} + {% include "corporate/support/realm_details.html" %} + {% endwith %} + {% elif realm %} + realm +

{{ realm.string_id }}

+ {% else %} + realm +

N/A

+ {% endif %}
- {% elif realm %} - Realm: {{ realm.string_id }} -
- {% endif %} -
-
{% endfor %}
diff --git a/web/styles/portico/activity.css b/web/styles/portico/activity.css index 0c61c5b8a2..a035390a37 100644 --- a/web/styles/portico/activity.css +++ b/web/styles/portico/activity.css @@ -355,6 +355,23 @@ tr.admin td:first-child { grid-area: realm; } +.confirmation-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-auto-rows: minmax(100px, auto); + grid-template-areas: "confirmation-realm confirmation"; +} + +.confirmation-information-section { + grid-area: confirmation; +} + +.confirmation-realm-section { + grid-area: confirmation-realm; +} + +.confirmation-information-section, +.confirmation-realm-section, .user-information-section, .user-realm-information-section, .remote-realms-section, @@ -364,11 +381,13 @@ tr.admin td:first-child { padding: 10px; } +.confirmation-realm-section, .user-realm-information-section, .remote-server-section { background-color: hsl(60deg 11% 86%); } +.confirmation-information-section, .user-information-section, .remote-realms-section { background-color: hsl(60deg 12% 90%);