aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-29 10:52:53 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-29 10:53:14 +0000
commita1094544bb03fd18cda0e7885fd488ee633a9abc (patch)
tree42a6ed8b82f1d636922a1848d88c8f937428b5c7 /web
parent0a1236b29bd0f22d7bdb112e08cef39de2a6cd4c (diff)
Fix saving of inspect form data offline.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/offline.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/offline.js b/web/cobrands/fixmystreet/offline.js
index a611cfec0..4d7c471aa 100644
--- a/web/cobrands/fixmystreet/offline.js
+++ b/web/cobrands/fixmystreet/offline.js
@@ -342,8 +342,9 @@ fixmystreet.offline = (function() {
// try and submit and we get the Chrome offline error page
var btn = $('#report_inspect_form input[type=submit]');
btn.click(function() {
- var data = $(this).serialize() + '&save=1&saved_at=' + Math.floor(+new Date() / 1000);
- fixmystreet.offlineData.addForm(this.action, data);
+ var form = $(this).closest('form');
+ var data = form.serialize() + '&save=1&saved_at=' + Math.floor(+new Date() / 1000);
+ fixmystreet.offlineData.addForm(form.attr('action'), data);
location.href = '/my/planned?saved=1';
return false;
});