Submit forms to the container's target URL if the form's action is not set
refs #8605
This commit is contained in:
parent
f60a0b86ec
commit
1bd2e7cb84
|
@ -239,10 +239,8 @@
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
icinga.logger.debug('Submitting form: ' + method + ' ' + url, method);
|
||||
|
||||
if ($button.length) {
|
||||
// activate spinner indicator
|
||||
// Activate spinner
|
||||
if ($button.hasClass('spinner')) {
|
||||
$button.addClass('active');
|
||||
}
|
||||
|
@ -252,6 +250,13 @@
|
|||
$target = self.getLinkTargetFor($form);
|
||||
}
|
||||
|
||||
if (! url) {
|
||||
// Use the URL of the target container if the form's action is not set
|
||||
url = $target.closest('.container').data('icinga-url');
|
||||
}
|
||||
|
||||
icinga.logger.debug('Submitting form: ' + method + ' ' + url, method);
|
||||
|
||||
if (method === 'GET') {
|
||||
var dataObj = $form.serializeObject();
|
||||
|
||||
|
@ -274,6 +279,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
icinga.loader.loadUrl(url, $target, data, method);
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue