1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Ajax API: support for forms without ID.

This commit is contained in:
Lóna Lore 2016-03-25 10:21:19 +01:00
parent 5498c0ac15
commit 91e504c220

View File

@ -409,13 +409,13 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
options.target = "#" + options.target;
}
var form = $element.closest("form").attr('id');
var data = $('#' + form).serialize();
var form = $element.closest("form");
var data = form.serialize() || '';
$.ajax({
type: options.type || 'POST',
url: options.url,
data: data || '',
data: data,
complete: function ()
{
if($loadingImage)