diff --git a/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee index f91e137ca7..7727798197 100644 --- a/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee @@ -10,4 +10,4 @@ Darkswarm.controller "LoginCtrl", ($scope, $http, $window, AuthenticationService $window.location.href = $window.location.origin + $window.location.pathname # Strips out hash fragments .error (data) -> Loading.clear() - $scope.errors = data.message + $scope.errors = data.message || data.error diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index 95843b3a10..b4e9c3a7cc 100644 --- a/app/controllers/user_registrations_controller.rb +++ b/app/controllers/user_registrations_controller.rb @@ -5,7 +5,7 @@ class UserRegistrationsController < Spree::UserRegistrationsController def create @user = build_resource(params[:spree_user]) if resource.save - set_flash_message(:success, :signed_up) + set_flash_message(:success, :signed_up_but_unconfirmed) session[:spree_user_signup] = true associate_user diff --git a/config/locales/en.yml b/config/locales/en.yml index c93ee76242..b7cdff8e86 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,10 +71,14 @@ en: email: taken: "There's already an account for this email. Please login or reset your password." devise: + user_registrations: + spree_user: + signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account." failure: invalid: | Invalid email or password. Were you a guest last time? Perhaps you need to create an account or reset your password. + unconfirmed: "You have to confirm your account before continuing." enterprise_confirmations: enterprise: confirmed: Thank you, your email address has been confirmed. diff --git a/spec/features/consumer/authentication_spec.rb b/spec/features/consumer/authentication_spec.rb index 157b037da9..310afb2e79 100644 --- a/spec/features/consumer/authentication_spec.rb +++ b/spec/features/consumer/authentication_spec.rb @@ -80,7 +80,7 @@ feature "Authentication", js: true, retry: 3 do fill_in "Confirm password", with: "test12345" expect do click_signup_button - page.should have_content "Welcome! You have signed up successfully" + page.should have_content I18n.t('devise.user_registrations.spree_user.signed_up_but_unconfirmed') end.to enqueue_job Delayed::PerformableMethod expect(Delayed::Job.last.payload_object.method_name).to eq(:send_on_create_confirmation_instructions_without_delay) end