diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-04 21:16:24 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-05 08:00:43 +0100 |
commit | 9924113ea73d8af2614481a854c4261acb3f245e (patch) | |
tree | b6665ebd2160affb30e1211eac29f3cf03d066e9 /web | |
parent | 15d5b4d479e75823ad6cb1b323a26498a6ef3cf8 (diff) |
Stop update form toggle causing report submission.
If the report is loaded with JavaScript, the outer form (for a new
report) is present and would otherwise take this click and start a
broken new report submission.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/staff.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/staff.js b/web/cobrands/fixmystreet/staff.js index 2a1c6a8f4..2f9de6c7e 100644 --- a/web/cobrands/fixmystreet/staff.js +++ b/web/cobrands/fixmystreet/staff.js @@ -312,7 +312,8 @@ $.extend(fixmystreet.set_up, { $updateFormH2.hide().nextAll().hide(); $updateFormBtn.addClass('btn btn--provide-update'); $updateFormBtn.text( $updateFormH2.text() ); - $updateFormBtn.on('click', function(){ + $updateFormBtn.on('click', function(e) { + e.preventDefault(); $updateFormH2.nextAll().toggle(); }); }, |