From dd1f56b5c4aa630d3f84e41c12af666f53e88dea Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 25 May 2016 17:49:34 -0400 Subject: Customize the Devise `password_change` emails --- app/views/devise/mailer/password_change.html.haml | 10 ++++++++++ app/views/devise/mailer/password_change.text.erb | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 app/views/devise/mailer/password_change.html.haml create mode 100644 app/views/devise/mailer/password_change.text.erb (limited to 'app/views') diff --git a/app/views/devise/mailer/password_change.html.haml b/app/views/devise/mailer/password_change.html.haml new file mode 100644 index 00000000000..3349ee84807 --- /dev/null +++ b/app/views/devise/mailer/password_change.html.haml @@ -0,0 +1,10 @@ +.center + #content + %h2 Hello, #{@resource.name}! + %p + The password for your GitLab account on + #{link_to(Gitlab.config.gitlab.url, Gitlab.config.gitlab.url)} + has successfully been changed. + %p + If you did not initiate this change, please contact your administrator + immediately. diff --git a/app/views/devise/mailer/password_change.text.erb b/app/views/devise/mailer/password_change.text.erb new file mode 100644 index 00000000000..95923d9f8de --- /dev/null +++ b/app/views/devise/mailer/password_change.text.erb @@ -0,0 +1,7 @@ +Hello, <%= @resource.name %>! + +The password for your GitLab account on <%= Gitlab.config.gitlab.url %> +has successfully been changed. + +If you did not initiate this change, please contact your administrator +immediately. -- cgit v1.2.1 From 3a5315d3ceed547de47685ba1a57b31cc8b67c96 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 25 May 2016 17:51:52 -0400 Subject: Customize the Devise `reset_password_instructions` email --- app/views/devise/mailer/reset_password_instructions.html.erb | 8 -------- .../devise/mailer/reset_password_instructions.html.haml | 12 ++++++++++++ app/views/devise/mailer/reset_password_instructions.text.erb | 10 ++++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) delete mode 100644 app/views/devise/mailer/reset_password_instructions.html.erb create mode 100644 app/views/devise/mailer/reset_password_instructions.html.haml create mode 100644 app/views/devise/mailer/reset_password_instructions.text.erb (limited to 'app/views') diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb deleted file mode 100644 index 23b31da92d8..00000000000 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hello <%= @resource.email %>!

- -

Someone has requested a link to change your password, and you can do this through the link below.

- -

<%= link_to 'Change your password', edit_password_url(@resource, reset_password_token: @token) %>

- -

If you didn't request this, please ignore this email.

-

Your password won't change until you access the link above and create a new one.

diff --git a/app/views/devise/mailer/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml new file mode 100644 index 00000000000..e91c9522520 --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.haml @@ -0,0 +1,12 @@ +.center + #content + %h2 Hello, #{@resource.name}! + %p + Someone, hopefully you, has requested to reset the password for your + GitLab account on #{link_to(Gitlab.config.gitlab.url, Gitlab.config.gitlab.url)}. + %p + If you did not perform this request, you can safely ignore this email. + %p + Otherwise, click the link below to complete the process. + #cta + = link_to('Reset password', edit_password_url(@resource, reset_password_token: @token)) diff --git a/app/views/devise/mailer/reset_password_instructions.text.erb b/app/views/devise/mailer/reset_password_instructions.text.erb new file mode 100644 index 00000000000..116313ee11c --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.text.erb @@ -0,0 +1,10 @@ +Hello, <%= @resource.name %>! + +Someone, hopefully you, has requested to reset the password for your GitLab +account on <%= Gitlab.config.gitlab.url %> + +If you did not perform this request, you can safely ignore this email. + +Otherwise, click the link below to complete the process: + +<%= edit_password_url(@resource, reset_password_token: @token) %> -- cgit v1.2.1 From 933cd3478d8930fa5472d509d78bb7dd481d2360 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 25 May 2016 17:53:13 -0400 Subject: Customize the Devise `unlock_instructions` email --- app/views/devise/mailer/unlock_instructions.html.haml | 19 +++++++++---------- app/views/devise/mailer/unlock_instructions.text.erb | 7 +++++++ 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 app/views/devise/mailer/unlock_instructions.text.erb (limited to 'app/views') diff --git a/app/views/devise/mailer/unlock_instructions.html.haml b/app/views/devise/mailer/unlock_instructions.html.haml index 52b327e20c5..9990d1ccac6 100644 --- a/app/views/devise/mailer/unlock_instructions.html.haml +++ b/app/views/devise/mailer/unlock_instructions.html.haml @@ -1,10 +1,9 @@ -%p -Hello #{@resource.name}! - -%p - Your GitLab account has been locked due to an excessive amount of unsuccessful - sign in attempts. Your account will automatically unlock in - = time_ago_in_words(Devise.unlock_in.from_now) - or you may click the link below to unlock now. - -%p= link_to 'Unlock your account', unlock_url(@resource, unlock_token: @token) +.center + #content + %h2 Hello, #{@resource.name}! + %p + Your GitLab account has been locked due to an excessive amount of unsuccessful + sign in attempts. Your account will automatically unlock in #{time_ago_in_words(Devise.unlock_in.from_now)} + or you may click the link below to unlock now. + #cta + = link_to('Unlock account', unlock_url(@resource, unlock_token: @token)) diff --git a/app/views/devise/mailer/unlock_instructions.text.erb b/app/views/devise/mailer/unlock_instructions.text.erb new file mode 100644 index 00000000000..3aea3e20145 --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.text.erb @@ -0,0 +1,7 @@ +Hello, <%= @resource.name %>! + +Your GitLab account has been locked due to an excessive amount of unsuccessful +sign in attempts. Your account will automatically unlock in <%= time_ago_in_words(Devise.unlock_in.from_now) %> +or you may click the link below to unlock now. + +<%= unlock_url(@resource, unlock_token: @token) %> -- cgit v1.2.1