Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / assets / javascripts / report_issue.js
index f3c323c63ba72bd05dde4e40a87cdcd46e936511..0285693e8841ce83e040ec503f4a5dfb867e4935 100644 (file)
@@ -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('<div><br/></div><div class="modal-footer-status alert alert-success"><p class="contain-align-left">Thanks for reporting this issue!</p></div>');
-      }).
-      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;
   });