mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
clean form fix for snmp add modal
This commit is contained in:
parent
7a532c75aa
commit
6bba71a8de
6 changed files with 11 additions and 7 deletions
|
|
@ -129,6 +129,7 @@
|
|||
}
|
||||
|
||||
cleanForm() {
|
||||
console.log(this);
|
||||
/* remove validation fields and tracks */
|
||||
$(this.element).find('input:visible,textarea:visible,select').each(function(i, input) {
|
||||
$(this).removeClass(`is-valid`).removeClass(`is-invalid`);
|
||||
|
|
@ -154,7 +155,7 @@
|
|||
method(this.options.endpoint, dataToSend)
|
||||
.done(function (response, textStatus) {
|
||||
if (self.options.resetAfterSubmit) self.cleanForm();
|
||||
self.options.onSubmitSuccess(response, dataToSend, self.cleanForm);
|
||||
self.options.onSubmitSuccess(response, dataToSend, self);
|
||||
/* unbind the old closure on submit event and bind a new one */
|
||||
$(self.element).off('submit', self.submitHandler);
|
||||
self.delegateSubmit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue