mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +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) {
|
||||
// Abort if the form already has a 'target' attribute.
|
||||
form = $(form);
|
||||
if (form.attr('target')) {
|
||||
return;
|
||||
}
|
||||
// Get success and error callback functions.
|
||||
if (typeof callback_success === 'undefined') {
|
||||
callback_success = form.data('callback-success');
|
||||
|
|
@ -427,8 +424,10 @@
|
|||
}
|
||||
};
|
||||
$(document).on('submit', 'form.rx_ajax', function(event) {
|
||||
event.preventDefault();
|
||||
XE.ajaxForm(this);
|
||||
if (!$(this).attr('target')) {
|
||||
event.preventDefault();
|
||||
XE.ajaxForm(this);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue