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 /web | |
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 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 5163501c1..c15fe0375 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -880,13 +880,13 @@ $.extend(fixmystreet.set_up, { // Display tweak $('.js-new-report-sign-in-hidden.form-box, .js-new-report-sign-in-shown.form-box').removeClass('form-box'); - $('#js-new-report-user-hide').click(function(e) { + $('.js-new-report-user-hide').click(function(e) { e.preventDefault(); $('.js-new-report-user-shown')[0].scrollIntoView({behavior: "smooth"}); hide('.js-new-report-user-shown'); show('.js-new-report-user-hidden'); }); - $('#js-new-report-user-show').click(function(e) { + $('.js-new-report-user-show').click(function(e) { e.preventDefault(); if (!$(this).closest('form').validate().form()) { return; @@ -898,20 +898,20 @@ $.extend(fixmystreet.set_up, { }); }); - $('#js-new-report-show-sign-in').click(function(e) { + $('.js-new-report-show-sign-in').click(function(e) { $('.js-new-report-sign-in-shown').removeClass('hidden-js'); $('.js-new-report-sign-in-hidden').addClass('hidden-js'); focusFirstVisibleInput(); }); - $('#js-new-report-hide-sign-in').click(function(e) { + $('.js-new-report-hide-sign-in').click(function(e) { e.preventDefault(); $('.js-new-report-sign-in-shown').addClass('hidden-js'); $('.js-new-report-sign-in-hidden').removeClass('hidden-js'); focusFirstVisibleInput(); }); - $('#js-new-report-sign-in-forgotten').click(function() { + $('.js-new-report-sign-in-forgotten').click(function() { $('.js-new-report-sign-in-shown').addClass('hidden-js'); $('.js-new-report-sign-in-hidden').removeClass('hidden-js'); $('.js-new-report-forgotten-shown').removeClass('hidden-js'); |