From 11c176407400220cf7068f1ac4628725a42219bc Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 23 Oct 2013 15:32:28 +0200 Subject: [PATCH] Settings validation messages are properly cleared --- js_src/SettingsWindow.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js_src/SettingsWindow.js b/js_src/SettingsWindow.js index 9eb7191..c345fcf 100644 --- a/js_src/SettingsWindow.js +++ b/js_src/SettingsWindow.js @@ -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 = "

"+msg+"

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