修复BUG:所有编辑弹框validate后样式被保留
This commit is contained in:
parent
5554995884
commit
7ddae1a427
|
@ -33,9 +33,11 @@
|
||||||
if (this.options.modal && this.options.modal.constructor === String) {
|
if (this.options.modal && this.options.modal.constructor === String) {
|
||||||
$('#' + this.options.modal).on('show.bs.modal', function (e) {
|
$('#' + this.options.modal).on('show.bs.modal', function (e) {
|
||||||
if (that.options.validateForm.constructor === String) {
|
if (that.options.validateForm.constructor === String) {
|
||||||
var v = $('#' + that.options.validateForm).validate();
|
var v = $('#' + that.options.validateForm);
|
||||||
v.currentElements.each(function () { $(this).popover('destroy'); })
|
var vf = v.validate();
|
||||||
v.resetForm();
|
vf.currentElements.each(function () { $(this).popover('destroy'); })
|
||||||
|
vf.resetForm();
|
||||||
|
v.find('div.form-group').removeClass("has-error has-success");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue