mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-04 19:33:22 +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) {
|
this.displayValidationError = function(key,msg) {
|
||||||
var formElement = self.form.find("[name|='"+key+"']");
|
var formElement = self.form.find("[name|='"+key+"']");
|
||||||
console.log("formElement: ",formElement);
|
|
||||||
formElement.addClass("error");
|
formElement.addClass("error");
|
||||||
var errorMsg = "<p class='errorMsg'>"+msg+"</p>"
|
var errorMsg = "<p class='errorMsg'>"+msg+"</p>"
|
||||||
formElement.after(errorMsg);
|
formElement.after(errorMsg);
|
||||||
}
|
}
|
||||||
this.clearValidationErrors = function() {
|
this.clearValidationErrors = function() {
|
||||||
var formElements = self.form.find(".error");
|
self.form.find(".errorMsg").remove();
|
||||||
formElements.each( function(index,element) {
|
self.form.find(".error").removeClass("error");
|
||||||
$(element).removeClass("error");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.readForm = function() {
|
this.readForm = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user