mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adjust user signup feedback
This commit is contained in:
committed by
Rob Harrington
parent
7d971fc39d
commit
28ded1f0c2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user