diff --git a/templates/zerver/zulipchat_migration_tos.html b/templates/corporate/zulipchat_migration_tos.html similarity index 100% rename from templates/zerver/zulipchat_migration_tos.html rename to templates/corporate/zulipchat_migration_tos.html diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index aeb16a37e4..b5d17f5d81 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -496,7 +496,7 @@ class HomeTest(ZulipTestCase): user.tos_version = None user.save() - with self.settings(FIRST_TIME_TOS_TEMPLATE="hello.html"), self.settings( + with self.settings(FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE="zerver/hello.html"), self.settings( TERMS_OF_SERVICE_VERSION="99.99" ): result = self.client_post("/accounts/accept_terms/") diff --git a/zerver/views/home.py b/zerver/views/home.py index ed187d451c..6438e58448 100644 --- a/zerver/views/home.py +++ b/zerver/views/home.py @@ -49,8 +49,11 @@ def accounts_accept_terms(request: HttpRequest) -> HttpResponse: email = request.user.delivery_email special_message_template = None - if request.user.tos_version is None and settings.FIRST_TIME_TOS_TEMPLATE is not None: - special_message_template = "zerver/" + settings.FIRST_TIME_TOS_TEMPLATE + if ( + request.user.tos_version is None + and settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE is not None + ): + special_message_template = settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE return render( request, "zerver/accounts_accept_terms.html", diff --git a/zproject/default_settings.py b/zproject/default_settings.py index 1ce2d37987..43d2cb0023 100644 --- a/zproject/default_settings.py +++ b/zproject/default_settings.py @@ -360,7 +360,7 @@ REALM_CREATION_LINK_VALIDITY_DAYS = 7 # Zulip again on the web. TERMS_OF_SERVICE_VERSION: Optional[str] = None # Template to use when bumping TERMS_OF_SERVICE_VERSION to explain situation. -FIRST_TIME_TOS_TEMPLATE: Optional[str] = None +FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE: Optional[str] = None # Hostname used for Zulip's statsd logging integration. STATSD_HOST = ""