From 6058d8a2af0a7461f9a412b1b69948e4d0e9224f Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 6 Mar 2015 17:23:47 -0500 Subject: [PATCH] 5105: Include form data with report_issue request. --- .../app/assets/javascripts/report_issue.js | 13 +++++++------ .../views/application/_report_issue_popup.html.erb | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/report_issue.js b/apps/workbench/app/assets/javascripts/report_issue.js index 371dacc1af..539489d5fb 100644 --- a/apps/workbench/app/assets/javascripts/report_issue.js +++ b/apps/workbench/app/assets/javascripts/report_issue.js @@ -8,14 +8,15 @@ $(document). } $('div').remove('.modal-footer-status'); - $.ajax('/report_issue', {type: 'POST'}). - success(function(data, status, jqxhr) { + $.ajax('/report_issue', { + type: 'POST', + data: $(this).parents('form').serialize() + }).success(function(data, status, jqxhr) { var $sendButton = $('#report-issue-submit'); $sendButton.html('Report sent'); $('div').remove('.modal-footer-status'); $('.modal-footer').append('

'); - }). - fail(function(jqxhr, status, error) { + }).fail(function(jqxhr, status, error) { var $sendButton = $('#report-issue-submit'); if ($sendButton && $sendButton.prop('disabled')) { $('div').remove('.modal-footer-status'); @@ -25,6 +26,6 @@ $(document). } var $cancelButton = $('#report-issue-cancel'); $cancelButton.html('Cancel'); - }); - + }); + return false; }); diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb index 315116bbc8..1c964abfe0 100644 --- a/apps/workbench/app/views/application/_report_issue_popup.html.erb +++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb @@ -27,7 +27,7 @@