tos: Adjust migration tos to look same as our new standard tos.

This commit is contained in:
Aman Agrawal 2022-01-25 13:54:19 +00:00 committed by Tim Abbott
parent ca71e28cd6
commit 37d7d6ccd4
3 changed files with 12 additions and 13 deletions

View File

@ -1,6 +1,7 @@
<div class="pitch"> <div class="description">
{% trans %} <p>
<p>This organization has been migrated to new hosting on zulip.com. We just need you to do one last thing.</p> {% trans %}
<h3>Accept the Zulip Cloud terms of service</h3> This team chat is now being hosted on Zulip Cloud. Please accept the <a href="https://zulip.com/policies/terms">Zulip Terms of Service</a> to continue.
{% endtrans %} {% endtrans %}
</p>
</div> </div>

View File

@ -9,13 +9,9 @@ the registration flow has its own (nearly identical) copy of the fields below in
<div class="account-accept-terms-page flex full-page"> <div class="account-accept-terms-page flex full-page">
<div class="center-block new-style"> <div class="center-block new-style">
{% if special_message_template %}
{% include special_message_template %}
{% else %}
<div class="pitch"> <div class="pitch">
<h1 class="get-started">{{ _("Accept the Terms of Service") }}</h1> <h1 class="get-started">{{ _("Accept the Terms of Service") }}</h1>
</div> </div>
{% endif %}
<div class="form-horizontal white-box"> <div class="form-horizontal white-box">
<form method="post" class="form-horizontal" id="registration" action="{{ url('accept_terms') }}"> <form method="post" class="form-horizontal" id="registration" action="{{ url('accept_terms') }}">
@ -27,7 +23,9 @@ the registration flow has its own (nearly identical) copy of the fields below in
</div> </div>
</div> </div>
{% if terms_of_service_message %} {% if first_time_terms_of_service_message_template %}
{% include first_time_terms_of_service_message_template %}
{% elif terms_of_service_message %}
<div class="description"> <div class="description">
<p>{{ terms_of_service_message |safe }}</p> <p>{{ terms_of_service_message |safe }}</p>
</div> </div>

View File

@ -45,19 +45,19 @@ def accounts_accept_terms(request: HttpRequest) -> HttpResponse:
form = ToSForm() form = ToSForm()
email = request.user.delivery_email email = request.user.delivery_email
special_message_template = None first_time_terms_of_service_message_template = None
if ( if (
request.user.tos_version is None request.user.tos_version is None
and settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE is not None and settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE is not None
): ):
special_message_template = settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE first_time_terms_of_service_message_template = settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE
return render( return render(
request, request,
"zerver/accounts_accept_terms.html", "zerver/accounts_accept_terms.html",
context={ context={
"form": form, "form": form,
"email": email, "email": email,
"special_message_template": special_message_template, "first_time_terms_of_service_message_template": first_time_terms_of_service_message_template,
}, },
) )