Commit 2f7bf850 authored by Dmitry Gruzd's avatar Dmitry Gruzd

Merge branch 'jswain_almost_there' into 'master'

Improve the "Almost Finished" page

See merge request gitlab-org/gitlab!63704
parents 94ae2c85 21cc9fdb
...@@ -13,7 +13,7 @@ class ConfirmationsController < Devise::ConfirmationsController ...@@ -13,7 +13,7 @@ class ConfirmationsController < Devise::ConfirmationsController
protected protected
def after_resending_confirmation_instructions_path_for(resource) def after_resending_confirmation_instructions_path_for(resource)
return users_almost_there_path unless Feature.enabled?(:soft_email_confirmation) return users_almost_there_path(email: resource.email) unless Feature.enabled?(:soft_email_confirmation)
stored_location_for(resource) || dashboard_projects_path stored_location_for(resource) || dashboard_projects_path
end end
......
...@@ -52,7 +52,7 @@ module Registrations ...@@ -52,7 +52,7 @@ module Registrations
end end
def path_for_signed_in_user(user) def path_for_signed_in_user(user)
return users_almost_there_path if requires_confirmation?(user) return users_almost_there_path(email: user.email) if requires_confirmation?(user)
stored_location_for(user) || members_activity_path(user.members) stored_location_for(user) || members_activity_path(user.members)
end end
......
...@@ -101,7 +101,7 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -101,7 +101,7 @@ class RegistrationsController < Devise::RegistrationsController
Gitlab::AppLogger.info(user_created_message) Gitlab::AppLogger.info(user_created_message)
return new_user_session_path(anchor: 'login-pane') if resource.blocked_pending_approval? return new_user_session_path(anchor: 'login-pane') if resource.blocked_pending_approval?
Feature.enabled?(:soft_email_confirmation) ? dashboard_projects_path : users_almost_there_path Feature.enabled?(:soft_email_confirmation) ? dashboard_projects_path : users_almost_there_path(email: resource.email)
end end
private private
......
- user_email = "(#{params[:email]})" if params[:email].present?
.well-confirmation.gl-text-center.gl-mb-6 .well-confirmation.gl-text-center.gl-mb-6
%h1.gl-mt-0 %h1.gl-mt-0
= _("Almost there...") = _("Almost there...")
%p.lead.gl-mb-6 %p.lead.gl-mb-6
= _("Please check your email to confirm your account") = _('Please check your email %{email} to confirm your account') % { email: user_email }
%hr %hr
- if Gitlab::CurrentSettings.after_sign_up_text.present? - if Gitlab::CurrentSettings.after_sign_up_text.present?
.well-confirmation.gl-text-center .well-confirmation.gl-text-center
...@@ -10,5 +12,5 @@ ...@@ -10,5 +12,5 @@
%p.text-center %p.text-center
= _("No confirmation email received? Please check your spam folder or") = _("No confirmation email received? Please check your spam folder or")
.gl-mb-6.prepend-top-20.gl-text-center .gl-mb-6.prepend-top-20.gl-text-center
%a.btn.gl-button.btn-confirm{ href: new_user_confirmation_path } %a.gl-link{ href: new_user_confirmation_path }
= _("Request new confirmation email") = _("Request new confirmation email")
...@@ -24452,10 +24452,10 @@ msgstr "" ...@@ -24452,10 +24452,10 @@ msgstr ""
msgid "Please check the configuration file to ensure that it is available and the YAML is valid" msgid "Please check the configuration file to ensure that it is available and the YAML is valid"
msgstr "" msgstr ""
msgid "Please check your email (%{email}) to verify that you own this address and unlock the power of CI/CD. Didn't receive it? %{resend_link}. Wrong email address? %{update_link}." msgid "Please check your email %{email} to confirm your account"
msgstr "" msgstr ""
msgid "Please check your email to confirm your account" msgid "Please check your email (%{email}) to verify that you own this address and unlock the power of CI/CD. Didn't receive it? %{resend_link}. Wrong email address? %{update_link}."
msgstr "" msgstr ""
msgid "Please choose a file" msgid "Please choose a file"
......
...@@ -204,7 +204,7 @@ RSpec.describe 'Signup' do ...@@ -204,7 +204,7 @@ RSpec.describe 'Signup' do
expect { click_button 'Register' }.to change { User.count }.by(1) expect { click_button 'Register' }.to change { User.count }.by(1)
expect(current_path).to eq users_almost_there_path expect(current_path).to eq users_almost_there_path
expect(page).to have_content('Please check your email to confirm your account') expect(page).to have_content("Please check your email (#{new_user.email}) to confirm your account")
confirm_email confirm_email
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment