diff options
Diffstat (limited to 'users/app')
-rw-r--r-- | users/app/assets/javascripts/users.js | 4 | ||||
-rw-r--r-- | users/app/controllers/controller_extension/authentication.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/users/app/assets/javascripts/users.js b/users/app/assets/javascripts/users.js index 1d05692..4195df8 100644 --- a/users/app/assets/javascripts/users.js +++ b/users/app/assets/javascripts/users.js @@ -41,6 +41,10 @@ var element, error, field; if ($.isPlainObject(message) && message.errors) { for (field in message.errors) { + if (field == 'base') { + alert_message(message.errors[field]); + next; + } error = message.errors[field]; element = $('form input[name$="[' + field + ']"]'); if (!element) { diff --git a/users/app/controllers/controller_extension/authentication.rb b/users/app/controllers/controller_extension/authentication.rb index 72df7a7..6daffdb 100644 --- a/users/app/controllers/controller_extension/authentication.rb +++ b/users/app/controllers/controller_extension/authentication.rb @@ -10,6 +10,7 @@ module ControllerExtension::Authentication def authentication_errors return unless attempted_login? errors = get_warden_errors + #default response to get_warden_errors is not an enumerable, so won't work if default is used errors.inject({}) do |translated,err| translated[err.first] = I18n.t(err.last) translated |