X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/425f97db9a84540d608b7717b8df3befce687c8f..6b3cfe60beb46ba087de5093926363d8b03ab889:/apps/workbench/app/assets/javascripts/report_issue.js diff --git a/apps/workbench/app/assets/javascripts/report_issue.js b/apps/workbench/app/assets/javascripts/report_issue.js index f3c323c63b..0285693e88 100644 --- a/apps/workbench/app/assets/javascripts/report_issue.js +++ b/apps/workbench/app/assets/javascripts/report_issue.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). on('click', "#report-issue-submit", function(e){ $(this).html('Sending'); @@ -8,14 +12,15 @@ $(document). } $('div').remove('.modal-footer-status'); - $.ajax('/'). - 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 +30,6 @@ $(document). } var $cancelButton = $('#report-issue-cancel'); $cancelButton.html('Cancel'); - }); - + }); + return false; });