aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-08-07 15:27:43 +0100
committerDave Arter <davea@mysociety.org>2019-08-16 14:25:12 +0100
commit7f15307a12d7e460fc55d23aedce82e2bdce4177 (patch)
tree7e1655ffc3a551f41c5a77a6a3a899a28dddedbe
parent8d38803db3225d14b8abda16cdf815b1758cd5c3 (diff)
[Westminster] Remove confirm/sign in by email.
-rw-r--r--t/app/controller/auth_social.t2
-rw-r--r--t/cobrand/westminster.t2
-rw-r--r--templates/web/westminster/auth/general.html15
-rw-r--r--templates/web/westminster/report/form/user.html6
4 files changed, 11 insertions, 14 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t
index ebde8e849..86aa92022 100644
--- a/t/app/controller/auth_social.t
+++ b/t/app/controller/auth_social.t
@@ -172,7 +172,7 @@ for my $state ( 'refused', 'no email', 'existing UID', 'okay' ) {
}
if ($state eq 'refused') {
- $mech->content_contains('Sorry, we could not log you in. Please fill in the form below.');
+ $mech->content_contains('Sorry, we could not log you in.');
$mech->not_logged_in_ok;
} elsif ($state eq 'no email') {
$mech->content_contains('We need your email address, please give it below.');
diff --git a/t/cobrand/westminster.t b/t/cobrand/westminster.t
index 02120aa50..dadcd4308 100644
--- a/t/cobrand/westminster.t
+++ b/t/cobrand/westminster.t
@@ -33,7 +33,7 @@ FixMyStreet::override_config {
subtest 'Login button displayed correctly' => sub {
$mech->get_ok("/auth");
- $mech->content_contains("Login with MyWestminster");
+ $mech->content_contains("Sign in with MyWestminster");
};
subtest 'Reports do not have update form' => sub {
diff --git a/templates/web/westminster/auth/general.html b/templates/web/westminster/auth/general.html
index 4fb639345..55999584e 100644
--- a/templates/web/westminster/auth/general.html
+++ b/templates/web/westminster/auth/general.html
@@ -10,7 +10,7 @@
<p class="form-error">[% loc('We need your email address, please give it below.') %]</p>
[% END %]
[% IF oauth_failure %]
- <p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p>
+ <p class="form-error">[% loc('Sorry, we could not log you in.') %]</p>
[% END %]
<form action="/auth" method="post" name="general_auth" class="validate">
@@ -18,16 +18,15 @@
<input type="hidden" name="r" value="[% c.req.params.r | html %]">
-[% IF NOT oauth_need_email AND c.cobrand.social_auth_enabled %]
- [% IF c.cobrand.feature('oidc_login') %]
+[% IF NOT oauth_need_email AND c.cobrand.social_auth_enabled AND c.cobrand.feature('oidc_login') %]
+
<div class="form-box">
<button name="social_sign_in" id="oidc_sign_in" value="oidc" class="btn btn--block btn--social btn--oidc">
- [% tprintf(loc('Login with %s'), c.cobrand.feature('oidc_login').display_name) %]
+ [% tprintf(loc('Sign in with %s'), c.cobrand.feature('oidc_login').display_name) %]
</button>
</div>
- [% END %]
- <div id="js-social-email-hide">
-[% END %]
+
+[% ELSE %]
[% loc_username_error = INCLUDE 'auth/_username_error.html' default='email' %]
@@ -54,8 +53,6 @@
[% END %]
</div>
-[% IF NOT oauth_need_email AND c.cobrand.social_auth_enabled %]
- </div>
[% END %]
</fieldset>
diff --git a/templates/web/westminster/report/form/user.html b/templates/web/westminster/report/form/user.html
index f9aebea6a..196d2ea4d 100644
--- a/templates/web/westminster/report/form/user.html
+++ b/templates/web/westminster/report/form/user.html
@@ -15,8 +15,9 @@
[% END %]
[% IF c.cobrand.feature('oidc_login') %]
<button name="social_sign_in" id="oidc_sign_in" value="oidc" class="btn btn--block btn--social btn--oidc">
- [% tprintf(loc('Login with %s'), c.cobrand.feature('oidc_login').display_name) %]
+ [% tprintf(loc('Sign in with %s'), c.cobrand.feature('oidc_login').display_name) %]
</button>
+ <small>Receive updates and view your reports</small>
[% END %]
[% IF c.config.TWITTER_KEY %]
<button name="social_sign_in" id="twitter_sign_in" value="twitter" class="btn btn--block btn--social btn--twitter">
@@ -24,11 +25,10 @@
[% loc('Log in with Twitter') %]
</button>
[% END %]
- <button type="button" class="btn btn--block hidden-nojs js-new-report-user-show">Confirm by email</button>
[% END %]
[% IF type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]
<small id="or">[% loc('or') %]</small>
- <button name="report_anonymously" value="yes" class="btn btn--block js-new-report-submit">[% loc('Report anonymously') %]</button>
+ <button name="report_anonymously" value="yes" class="btn btn--block js-new-report-submit">[% loc('Submit report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
[% END %]
</div>