frontend: Edit confirm_continue_registration.html to be clearer.

Fixes #5707.
This commit is contained in:
Vaida Plankyte 2017-07-17 16:31:05 +01:00 committed by Tim Abbott
parent eb001e42d0
commit 02d65a67af
5 changed files with 62 additions and 33 deletions

View File

@ -125,13 +125,28 @@ html {
}
.app-main.confirm-continue-page-container {
width: 600px;
width: 400px;
font-weight: 400;
}
.app-main.confirm-continue-page-container .form-inline {
width: 320px;
margin: auto;
display: inline-block;
width: 180px;
}
.app-main.confirm-continue-page-container .form-inline .outline {
border: 2px inset hsl(213, 23%, 25%);
background-color: hsl(0, 0%, 100%);
color: hsl(213, 23%, 25%);
padding: 13px 20px 11px 20px;
}
.app-main.confirm-continue-page-container .form-inline .outline:hover {
background-color: hsl(213, 65%, 97%);
}
.app-main.confirm-continue-page-container p {
font-size: 19px;
}
.find-team-page-container h3,
@ -183,6 +198,7 @@ html {
.register-form.new-style {
text-align: left;
color: hsl(0, 0%, 45%);
}
.register-form #errors {

View File

@ -654,6 +654,10 @@ a.bottom-signup-button {
margin-bottom: 50px;
}
.register-page-header {
text-align: left;
}
.login-page-header {
width: 100%;
}

View File

@ -23,28 +23,37 @@
<p>
{% trans %}
You attempted to login using the email account
{{ email }}, but this email address does not
have a Zulip account in this organization. If
you'd like, you can try to register a new
Zulip account with this email address.
No account found for {{ email }}. Would you like to register instead?
{% endtrans %}
</p>
{# TODO: Ideally, this should use whatever auth #}
{# method the user had used to get here, not just #}
{# send an email. #}
<form class="form-inline" id="send_confirm" name="send_confirm"
action="/register/" method="post">
{{ csrf_input }}
<input type="hidden"
id="email"
name="email"
value="{{ email }}" />
<button class="full-width">
{{ _("Continue to registration?") }}
</button>
</form>
<div style="text-align: left;">
<form class="form-inline" id="send_confirm" name="send_confirm"
action="/login/" method="post">
{{ csrf_input }}
<input type="hidden"
id="email"
name="email"
value="{{ email }}" />
<button>
{{ _("Go back to login") }}
</button>
</form>
{# TODO: Ideally, this should use whatever auth #}
{# method the user had used to get here, not just #}
{# send an email. #}
<form class="form-inline" id="send_confirm" name="send_confirm"
action="/register/" method="post">
{{ csrf_input }}
<input type="hidden"
id="email"
name="email"
value="{{ email }}" />
<button class="outline">
{{ _("Register instead") }}
</button>
</form>
</div>
{% endif %}
</div>
</div>

View File

@ -668,9 +668,9 @@ class GitHubAuthBackendTest(ZulipTestCase):
result = self.backend.do_auth(response=response)
self.assert_in_response(
'action="/register/"', result)
self.assert_in_response('You attempted to login using the email account',
self.assert_in_response('No account found for',
result)
self.assert_in_response('nonexisting@phantom.com, but this email address does not',
self.assert_in_response('nonexisting@phantom.com. Would you like to register instead?',
result)
def test_login_url(self):
@ -984,9 +984,9 @@ class GoogleSubdomainLoginTest(GoogleOAuthTest):
self.assertEqual(uri, 'http://zulip.testserver/accounts/login/subdomain/')
result = self.client_get(result.url)
self.assert_in_response('You attempted to login using the email account',
self.assert_in_response('No account found for',
result)
self.assert_in_response('newuser@zulip.com, but this email address does not',
self.assert_in_response('newuser@zulip.com. Would you like to register instead?',
result)
# Click confirm registration button.
result = self.client_post('/register/',
@ -1031,9 +1031,9 @@ class GoogleLoginTest(GoogleOAuthTest):
value=email)])
account_response = ResponseMock(200, account_data)
result = self.google_oauth2_test(token_response, account_response)
self.assert_in_response('You attempted to login using the email account',
self.assert_in_response('No account found for',
result)
self.assert_in_response('newuser@zulip.com, but this email address does not',
self.assert_in_response('newuser@zulip.com. Would you like to register instead?',
result)
# Click confirm registration button.
result = self.client_post('/register/',
@ -1560,7 +1560,7 @@ class TestZulipRemoteUserBackend(ZulipTestCase):
result = self.client_post('/accounts/login/sso/', REMOTE_USER=email)
self.assertEqual(result.status_code, 200)
self.assertIs(get_session_dict_user(self.client.session), None)
self.assert_in_response("You attempted to login using", result)
self.assert_in_response("No account found for", result)
def test_login_failure_due_to_invalid_email(self):
# type: () -> None
@ -1585,7 +1585,7 @@ class TestZulipRemoteUserBackend(ZulipTestCase):
REMOTE_USER=email)
self.assertEqual(result.status_code, 200)
self.assertIs(get_session_dict_user(self.client.session), None)
self.assert_in_response("You attempted to login using", result)
self.assert_in_response("No account found for", result)
def test_login_failure_due_to_empty_subdomain(self):
# type: () -> None
@ -1597,7 +1597,7 @@ class TestZulipRemoteUserBackend(ZulipTestCase):
REMOTE_USER=email)
self.assertEqual(result.status_code, 200)
self.assertIs(get_session_dict_user(self.client.session), None)
self.assert_in_response("You attempted to login using", result)
self.assert_in_response("No account found for", result)
def test_login_success_under_subdomains(self):
# type: () -> None

View File

@ -1826,9 +1826,9 @@ class LoginOrAskForRegistrationTestCase(ZulipTestCase):
user_profile,
full_name=full_name,
invalid_subdomain=invalid_subdomain)
self.assert_in_response('You attempted to login using the email account',
self.assert_in_response('No account found for',
result)
self.assert_in_response('new@zulip.com, but this email address does not',
self.assert_in_response('new@zulip.com. Would you like to register instead?',
result)
def test_invalid_subdomain(self):