diff options
-rw-r--r-- | app/helpers/emails_helper.rb | 6 | ||||
-rw-r--r-- | app/views/notify/new_user_email.html.haml | 3 | ||||
-rw-r--r-- | app/views/notify/new_user_email.text.erb | 11 | ||||
-rw-r--r-- | changelogs/unreleased/improve-email-text-part.yml | 5 |
4 files changed, 16 insertions, 9 deletions
diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb index 2beb081ab77..36122d3a22a 100644 --- a/app/helpers/emails_helper.rb +++ b/app/helpers/emails_helper.rb @@ -57,12 +57,6 @@ module EmailsHelper pluralize(valid_length, unit) end - def reset_token_expire_message - link_tag = link_to('request a new one', new_user_password_url(user_email: @user.email)) - "This link is valid for #{password_reset_token_valid_time}. " \ - "After it expires, you can #{link_tag}." - end - def header_logo if current_appearance&.header_logo? image_tag( diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml index dfbb5c75bd3..ec135ae994f 100644 --- a/app/views/notify/new_user_email.html.haml +++ b/app/views/notify/new_user_email.html.haml @@ -13,4 +13,5 @@ %p = link_to "Click here to set your password", edit_password_url(@user, reset_password_token: @token) %p - = raw reset_token_expire_message + This link is valid for #{password_reset_token_valid_time}. + After it expires, you can #{link_to("request a new one", new_user_password_url(user_email: @user.email))}. diff --git a/app/views/notify/new_user_email.text.erb b/app/views/notify/new_user_email.text.erb index f3f20f3bfba..7e0db75472d 100644 --- a/app/views/notify/new_user_email.text.erb +++ b/app/views/notify/new_user_email.text.erb @@ -1,10 +1,17 @@ Hi <%= sanitize_name(@user.name) %>! +<% if Gitlab::CurrentSettings.allow_signup? %> +Your account has been created successfully. +<% else %> The Administrator created an account for you. Now you are a member of the company GitLab application. +<% end %> login.................. <%= @user.email %> + <% if @user.created_by_id %> - <%= link_to "Click here to set your password", edit_password_url(@user, :reset_password_token => @token) %> +Click here to set your password: +<%= edit_password_url(@user, :reset_password_token => @token) %> - <%= reset_token_expire_message %> +This link is valid for <%= password_reset_token_valid_time %>. After it expires, you can request a new one here: +<%= new_user_password_url(user_email: @user.email) %> <% end %> diff --git a/changelogs/unreleased/improve-email-text-part.yml b/changelogs/unreleased/improve-email-text-part.yml new file mode 100644 index 00000000000..ce506cb1507 --- /dev/null +++ b/changelogs/unreleased/improve-email-text-part.yml @@ -0,0 +1,5 @@ +--- +title: Improve new user email markup unconsistency between text and html parts +merge_request: 29111 +author: Haunui Saint-sevin +type: fixed |