mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Settings validation messages are properly cleared
This commit is contained in:
parent
cc2bcf962c
commit
11c1764074
@ -245,16 +245,13 @@ function SettingsWindow() {
|
||||
}
|
||||
this.displayValidationError = function(key,msg) {
|
||||
var formElement = self.form.find("[name|='"+key+"']");
|
||||
console.log("formElement: ",formElement);
|
||||
formElement.addClass("error");
|
||||
var errorMsg = "<p class='errorMsg'>"+msg+"</p>"
|
||||
formElement.after(errorMsg);
|
||||
}
|
||||
this.clearValidationErrors = function() {
|
||||
var formElements = self.form.find(".error");
|
||||
formElements.each( function(index,element) {
|
||||
$(element).removeClass("error");
|
||||
});
|
||||
self.form.find(".errorMsg").remove();
|
||||
self.form.find(".error").removeClass("error");
|
||||
}
|
||||
|
||||
this.readForm = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user