diff options
Diffstat (limited to 'users/app/assets/javascripts')
-rw-r--r-- | users/app/assets/javascripts/users.js.coffee | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/users/app/assets/javascripts/users.js.coffee b/users/app/assets/javascripts/users.js.coffee index 8a9f0e9..ab437f6 100644 --- a/users/app/assets/javascripts/users.js.coffee +++ b/users/app/assets/javascripts/users.js.coffee @@ -1,8 +1,3 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ -# - preventDefault = (event) -> event.preventDefault() @@ -11,9 +6,9 @@ validOrAbort = (event) -> abortIfErrors = -> return if $.isEmptyObject(errors) - $.each errors, (field, error) -> - alert(error) - $('#srp_password').focus() + # we're relying on client_side_validations here instead of printing + # our own errors. This gets us translatable error messages. + $('.control-group.error input, .control-group.error select, control-group.error textarea').first().focus() event.stopImmediatePropagation() validatePassword = -> |