Commit 26908f9607eb59dc9de1b53354d6cd303bb7619b
1 parent
51e288ff
Exists in
master
and in
28 other branches
Added class to show that field has errors
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
plugins/stoa/public/javascripts/signup_complement.js
@@ -36,11 +36,13 @@ $("#usp_id_field").observe_field(1, function(){ | @@ -36,11 +36,13 @@ $("#usp_id_field").observe_field(1, function(){ | ||
36 | if(me.value) { | 36 | if(me.value) { |
37 | $('#signup-form .submit').attr('disabled', true); | 37 | $('#signup-form .submit').attr('disabled', true); |
38 | $(me).addClass('invalid'); | 38 | $(me).addClass('invalid'); |
39 | + $('#profile-data #usp_id_field').parent().addClass('fieldWithErrors') | ||
39 | $('#usp-id-invalid').show(); | 40 | $('#usp-id-invalid').show(); |
40 | } | 41 | } |
41 | else { | 42 | else { |
42 | $('#signup-form .submit').attr('disabled', false); | 43 | $('#signup-form .submit').attr('disabled', false); |
43 | $(me).removeClass('invalid'); | 44 | $(me).removeClass('invalid'); |
45 | + $('#profile-data #usp_id_field').parent().removeClass('fieldWithErrors') | ||
44 | $(me).removeClass('validated'); | 46 | $(me).removeClass('validated'); |
45 | } | 47 | } |
46 | $('#signup-birth-date').hide(); | 48 | $('#signup-birth-date').hide(); |