diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-05 19:03:35 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-05 19:29:35 +0000 |
commit | fda50e07fc671eefa68257fbc9d9bdea63dd4b0f (patch) | |
tree | e6cc50fc1fccbad38bbd256540a467bb75c27f83 /templates | |
parent | 07b3bb46fd7369bda5ce90df6c5edb62f8d853db (diff) |
Fix issue with multiple button IDs on page.
When a report is pulled in via ajax, it means there are then two sets of
login flow buttons on the page, and the JS setup only attaches to the
first of these.
Diffstat (limited to 'templates')
6 files changed, 8 insertions, 8 deletions
diff --git a/templates/web/base/report/form/private_details.html b/templates/web/base/report/form/private_details.html index 7184d7e25..5e5c23c24 100644 --- a/templates/web/base/report/form/private_details.html +++ b/templates/web/base/report/form/private_details.html @@ -3,7 +3,7 @@ [% UNLESS c.user_exists %] <p class="hidden-nojs js-new-report-sign-in-hidden"> - <a id="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a> + <a class="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a> </p> [% END %] diff --git a/templates/web/base/report/form/user.html b/templates/web/base/report/form/user.html index 9e5eaf3af..6381d2928 100644 --- a/templates/web/base/report/form/user.html +++ b/templates/web/base/report/form/user.html @@ -5,7 +5,7 @@ [% loc('Next:') %] [% loc('Tell us about you') %] </h2> [% IF c.user_exists OR NOT c.cobrand.social_auth_enabled %] - <button id="js-new-report-user-show" class="btn btn--block hidden-nojs">[% loc('Continue') %]</button> + <button class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Continue') %]</button> [% ELSE %] [% IF c.config.FACEBOOK_APP_ID %] <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> @@ -19,7 +19,7 @@ [% loc('Log in with Twitter') %] </button> [% END %] - <button id="js-new-report-user-show" class="btn btn--block hidden-nojs">[% loc('Log in with email') %]</button> + <button class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Log in with email') %]</button> [% END %] </div> <!-- /report/form/user.html --> diff --git a/templates/web/base/report/form/user_loggedout_password.html b/templates/web/base/report/form/user_loggedout_password.html index dfd7d0d14..02cfc9525 100644 --- a/templates/web/base/report/form/user_loggedout_password.html +++ b/templates/web/base/report/form/user_loggedout_password.html @@ -5,7 +5,7 @@ <p class="hidden-nojs"> [% loc('No account?') %] - <a id="js-new-report-hide-sign-in" href="#">[% loc('Fill in your details manually.') %]</a> + <a class="js-new-report-hide-sign-in" href="#">[% loc('Fill in your details manually.') %]</a> </p> [% IF c.cobrand.social_auth_enabled %] @@ -22,7 +22,7 @@ <p class="hidden-nojs"> [% loc('Forgotten your password?') %] - <a id="js-new-report-sign-in-forgotten" href="#">[% loc('Fill in your details manually.') %]</a> + <a class="js-new-report-sign-in-forgotten" href="#">[% loc('Fill in your details manually.') %]</a> </p> <div class="general-notes"> diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html index a3f236964..33f40486b 100644 --- a/templates/web/base/report/new/form_user.html +++ b/templates/web/base/report/new/form_user.html @@ -10,7 +10,7 @@ <strong class="js-form-section-preview" data-source="#form_title"></strong> <span class="js-form-section-preview" data-source="#form_detail"></span> </p> - <button id="js-new-report-user-hide" class="btn btn--block">[% loc('Edit report details') %]</button> + <button class="btn btn--block js-new-report-user-hide">[% loc('Edit report details') %]</button> </div> [% IF c.user_exists %] diff --git a/templates/web/base/report/update/form_user.html b/templates/web/base/report/update/form_user.html index 47ba18c12..ed47c8181 100644 --- a/templates/web/base/report/update/form_user.html +++ b/templates/web/base/report/update/form_user.html @@ -4,7 +4,7 @@ <div class="hidden-nojs form-section-preview"> <h2 class="form-section-heading">[% loc('Your update') %]</h2> <p class="js-form-section-preview" data-source="#form_update"></p> - <button id="js-new-report-user-hide" class="btn btn--block">[% loc('Edit your update') %]</button> + <button class="btn btn--block js-new-report-user-hide">[% loc('Edit your update') %]</button> </div> [% IF c.user_exists %] diff --git a/templates/web/bromley/report/form/private_details.html b/templates/web/bromley/report/form/private_details.html index d146c7ca3..0de56a748 100644 --- a/templates/web/bromley/report/form/private_details.html +++ b/templates/web/bromley/report/form/private_details.html @@ -3,7 +3,7 @@ [% UNLESS c.user_exists %] <p class="hidden-nojs js-new-report-sign-in-hidden"> - <a id="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a> + <a class="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a> </p> [% END %] |