mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix rx_ajax not working when a form contains file uploads
This commit is contained in:
parent
fc4d8a6824
commit
91b03795dc
1 changed files with 4 additions and 5 deletions
|
|
@ -372,9 +372,6 @@
|
||||||
XE.ajaxForm = function(form, callback_success, callback_error) {
|
XE.ajaxForm = function(form, callback_success, callback_error) {
|
||||||
// Abort if the form already has a 'target' attribute.
|
// Abort if the form already has a 'target' attribute.
|
||||||
form = $(form);
|
form = $(form);
|
||||||
if (form.attr('target')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Get success and error callback functions.
|
// Get success and error callback functions.
|
||||||
if (typeof callback_success === 'undefined') {
|
if (typeof callback_success === 'undefined') {
|
||||||
callback_success = form.data('callback-success');
|
callback_success = form.data('callback-success');
|
||||||
|
|
@ -427,8 +424,10 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$(document).on('submit', 'form.rx_ajax', function(event) {
|
$(document).on('submit', 'form.rx_ajax', function(event) {
|
||||||
event.preventDefault();
|
if (!$(this).attr('target')) {
|
||||||
XE.ajaxForm(this);
|
event.preventDefault();
|
||||||
|
XE.ajaxForm(this);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue