Commit e3055f86 authored by Aron Carroll's avatar Aron Carroll

Add server validation messages to the forms

parent 22947a5d
......@@ -721,10 +721,14 @@ class Auth
_error = (form, data) ->
{errors, reason} = data
$scope.errors = session: reason
$scope.errors[form] = {}
if reason # Seems legit, and only used for login messages...
$scope.login.password.$setValidity('server', false)
$scope.login.password.serverError = reason
for field, error of errors
$scope.errors[form][field] = error
$scope[form][field].$setValidity('server', false)
$scope[form][field].serverError = error
_startTimeout = ->
# Reset the auth forms after five minutes of inactivity
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment