From 02d65a67af4fdac6742bde37b039a097ec4d05a5 Mon Sep 17 00:00:00 2001 From: Vaida Plankyte Date: Mon, 17 Jul 2017 16:31:05 +0100 Subject: [PATCH] frontend: Edit confirm_continue_registration.html to be clearer. Fixes #5707. --- static/styles/portico-signin.css | 22 +++++++-- static/styles/portico.css | 4 ++ .../zerver/confirm_continue_registration.html | 47 +++++++++++-------- zerver/tests/test_auth_backends.py | 18 +++---- zerver/tests/test_signup.py | 4 +- 5 files changed, 62 insertions(+), 33 deletions(-) diff --git a/static/styles/portico-signin.css b/static/styles/portico-signin.css index 51163c6952..4bbaca1ec0 100644 --- a/static/styles/portico-signin.css +++ b/static/styles/portico-signin.css @@ -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 { diff --git a/static/styles/portico.css b/static/styles/portico.css index 83077eb296..48dd32d270 100644 --- a/static/styles/portico.css +++ b/static/styles/portico.css @@ -654,6 +654,10 @@ a.bottom-signup-button { margin-bottom: 50px; } +.register-page-header { + text-align: left; +} + .login-page-header { width: 100%; } diff --git a/templates/zerver/confirm_continue_registration.html b/templates/zerver/confirm_continue_registration.html index 98644103b8..5751f0d505 100644 --- a/templates/zerver/confirm_continue_registration.html +++ b/templates/zerver/confirm_continue_registration.html @@ -23,28 +23,37 @@

{% 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 %}

- {# TODO: Ideally, this should use whatever auth #} - {# method the user had used to get here, not just #} - {# send an email. #} -
- {{ csrf_input }} - - -
+
+
+ {{ csrf_input }} + + +
+ {# TODO: Ideally, this should use whatever auth #} + {# method the user had used to get here, not just #} + {# send an email. #} +
+ {{ csrf_input }} + + +
+
{% endif %} diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index 9480e41812..ed06796863 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -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 diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 341e3518a5..6155e89c5e 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -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):