0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-06-25 20:51:22 +02:00

Settings validation messages are properly cleared

This commit is contained in:
peteruithoven 2013-10-23 15:32:28 +02:00
parent cc2bcf962c
commit 11c1764074

View File

@ -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() {