mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Ajax API: support for forms without ID.
This commit is contained in:
@@ -409,13 +409,13 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
options.target = "#" + options.target;
|
options.target = "#" + options.target;
|
||||||
}
|
}
|
||||||
|
|
||||||
var form = $element.closest("form").attr('id');
|
var form = $element.closest("form");
|
||||||
var data = $('#' + form).serialize();
|
var data = form.serialize() || '';
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: options.type || 'POST',
|
type: options.type || 'POST',
|
||||||
url: options.url,
|
url: options.url,
|
||||||
data: data || '',
|
data: data,
|
||||||
complete: function ()
|
complete: function ()
|
||||||
{
|
{
|
||||||
if($loadingImage)
|
if($loadingImage)
|
||||||
|
Reference in New Issue
Block a user