mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
No automagic button for autosubmitted form
This commit is contained in:
parent
fcd05dfe81
commit
347186e282
@ -86,7 +86,7 @@
|
|||||||
$(document).on('submit', 'form', { self: this }, this.submitForm);
|
$(document).on('submit', 'form', { self: this }, this.submitForm);
|
||||||
|
|
||||||
// We support an 'autosubmit' class on dropdown form elements
|
// We support an 'autosubmit' class on dropdown form elements
|
||||||
$(document).on('change', 'form select.autosubmit', { self: this }, this.submitForm);
|
$(document).on('change', 'form select.autosubmit', { self: this }, this.autoSubmitForm);
|
||||||
|
|
||||||
$(document).on('keyup', '#menu input.search', {self: this}, this.submitForm);
|
$(document).on('keyup', '#menu input.search', {self: this}, this.submitForm);
|
||||||
|
|
||||||
@ -121,10 +121,14 @@
|
|||||||
$(this).removeClass('hover');
|
$(this).removeClass('hover');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
autoSubmitForm: function (event) {
|
||||||
|
return event.data.self.submitForm(event, true);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
submitForm: function (event) {
|
submitForm: function (event, autosubmit) {
|
||||||
var self = event.data.self;
|
var self = event.data.self;
|
||||||
var icinga = self.icinga;
|
var icinga = self.icinga;
|
||||||
|
|
||||||
@ -139,7 +143,9 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// TODO: Check button
|
// TODO: Check button
|
||||||
data.push({ name: 'btn_submit', value: 'yesss' });
|
if (typeof autosubmit === 'undefined' || ! autosubmit) {
|
||||||
|
data.push({ name: 'btn_submit', value: 'yesss' });
|
||||||
|
}
|
||||||
|
|
||||||
icinga.logger.debug('Submitting form: ' + method + ' ' + url);
|
icinga.logger.debug('Submitting form: ' + method + ' ' + url);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user