fixes styles for available username

It was always showing red instead of green, even if the username was
available
This commit is contained in:
rgarcia
2017-06-17 10:29:22 +02:00
parent 4ceff0a74f
commit 9c12680197

View File

@@ -9,7 +9,7 @@ App.RegistrationForm =
$("small").remove() $("small").remove()
showUsernameMessage = (response) -> showUsernameMessage = (response) ->
klass = if response.available then "error no-error" else "error error" klass = if response.available then "no-error" else "error"
usernameInput.after $("<small class=\"#{klass}\" style=\"margin-top: -16px;\">#{response.message}</small>") usernameInput.after $("<small class=\"#{klass}\" style=\"margin-top: -16px;\">#{response.message}</small>")
validateUsername = (username) -> validateUsername = (username) ->