Change users#update email change flash alert

This commit is contained in:
JASON KNOEPFLER
2019-09-20 10:35:25 -07:00
parent 9807b432f9
commit 07e0951490
2 changed files with 6 additions and 1 deletions

View File

@@ -46,7 +46,11 @@ module Spree
@user.spree_roles = roles.reject(&:blank?).collect{ |r| Spree::Role.find(r) }
end
flash.now[:success] = Spree.t(:account_updated)
if params[:user][:email] != @user.email
flash.now[:success] = Spree.t(:email_updated)
else
flash.now[:success] = Spree.t(:account_updated)
end
end
render :edit
end

View File

@@ -2943,6 +2943,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
email: Email
# TODO: remove 'account_updated' key once we get to Spree 2.0
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
my_account: "My account"
date: "Date"
time: "Time"