events.js: correctly detect form target container
This is for forms with no submit button. fixes #8710
This commit is contained in:
parent
3af36015ff
commit
5270acd645
|
@ -239,14 +239,18 @@
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
// activate spinner indicator
|
||||
if ($button.hasClass('spinner')) {
|
||||
$button.addClass('active');
|
||||
}
|
||||
|
||||
icinga.logger.debug('Submitting form: ' + method + ' ' + url, method);
|
||||
|
||||
$target = self.getLinkTargetFor($button);
|
||||
if ($button.length) {
|
||||
// activate spinner indicator
|
||||
if ($button.hasClass('spinner')) {
|
||||
$button.addClass('active');
|
||||
}
|
||||
|
||||
$target = self.getLinkTargetFor($button);
|
||||
} else {
|
||||
$target = self.getLinkTargetFor($form);
|
||||
}
|
||||
|
||||
if (method === 'GET') {
|
||||
var dataObj = $form.serializeObject();
|
||||
|
|
Loading…
Reference in New Issue