Prevent AJAX POST for multipart forms (e.g. file uploads).

Fixes bug 962670.

Change-Id: I4a2da4f86687088aa0ceed20159ae413d81c3c9a
This commit is contained in:
Gabriel Hurley 2012-03-24 17:58:30 -07:00
parent 477c13a407
commit 63d8d36509

View File

@ -54,6 +54,10 @@ horizon.addInitFunction(function() {
$(document).on('submit', '.modal:not(.static_page) form', function (evt) {
var $form = $(this);
if ($form.attr("enctype") === "multipart/form-data") {
// AJAX-upload for files is not currently supported.
return;
}
evt.preventDefault();
$.ajax({
type: "POST",