Commit 49d773270dddaf3a2a9b3d58c68964d8fa509542
Committed by
Thiago Ribeiro
1 parent
2efe8f08
Exists in
master
and in
3 other branches
Fix bug in highlight-error on fields of create institution
Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com> Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
public/views/create-institution.js
@@ -128,15 +128,13 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] | @@ -128,15 +128,13 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] | ||
128 | // (field)|(field)|... | 128 | // (field)|(field)|... |
129 | var verify_error = new RegExp("(\\[" + error_keys.join("\\])|(\\[") + "\\])" ); | 129 | var verify_error = new RegExp("(\\[" + error_keys.join("\\])|(\\[") + "\\])" ); |
130 | 130 | ||
131 | - console.log(error_keys); | ||
132 | - console.log(""); | ||
133 | - console.log(verify_error); | ||
134 | - | ||
135 | var fields_with_errors = $("#institution_dialog .formfield input").filter(function(index, field) { | 131 | var fields_with_errors = $("#institution_dialog .formfield input").filter(function(index, field) { |
132 | + $(field).removeClass("highlight-error"); | ||
136 | return verify_error.test(field.getAttribute("name")); | 133 | return verify_error.test(field.getAttribute("name")); |
137 | }); | 134 | }); |
138 | 135 | ||
139 | var selects_with_errors = $("#institution_dialog .formfield select").filter(function(index, field) { | 136 | var selects_with_errors = $("#institution_dialog .formfield select").filter(function(index, field) { |
137 | + $(field).removeClass("highlight-error"); | ||
140 | return verify_error.test(field.getAttribute("name")); | 138 | return verify_error.test(field.getAttribute("name")); |
141 | }); | 139 | }); |
142 | 140 |