From 73529809da99a88988875bbbc44b5ada674d3de2 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 14 Jun 2018 22:44:43 +0200 Subject: [PATCH] Add plain text templates for Devise mailers --- .../devise/mailer/confirmation_instructions.test.erb | 4 ++++ app/views/devise/mailer/email_changed.text.erb | 7 +++++++ app/views/devise/mailer/password_change.text.erb | 3 +++ .../devise/mailer/reset_password_instructions.text.erb | 8 ++++++++ app/views/devise/mailer/unlock_instructions.text.erb | 7 +++++++ 5 files changed, 29 insertions(+) create mode 100644 app/views/devise/mailer/confirmation_instructions.test.erb create mode 100644 app/views/devise/mailer/email_changed.text.erb create mode 100644 app/views/devise/mailer/password_change.text.erb create mode 100644 app/views/devise/mailer/reset_password_instructions.text.erb create mode 100644 app/views/devise/mailer/unlock_instructions.text.erb diff --git a/app/views/devise/mailer/confirmation_instructions.test.erb b/app/views/devise/mailer/confirmation_instructions.test.erb new file mode 100644 index 0000000..80484f5 --- /dev/null +++ b/app/views/devise/mailer/confirmation_instructions.test.erb @@ -0,0 +1,4 @@ +<%= t('.greeting', recipient: @email) %> + +<%= t('.instruction') %> +<%= confirmation_url(@resource, confirmation_token: @token) %> diff --git a/app/views/devise/mailer/email_changed.text.erb b/app/views/devise/mailer/email_changed.text.erb new file mode 100644 index 0000000..cf41f7f --- /dev/null +++ b/app/views/devise/mailer/email_changed.text.erb @@ -0,0 +1,7 @@ +<%= t('.greeting', recipient: @email) %> + +<% if @resource.try(:unconfirmed_email?) %> + <%= t('.message', email: @resource.unconfirmed_email) %> +<% else %> + <%= t('.message', email: @resource.email) %> +<% end %> 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 0000000..ca2d9b9 --- /dev/null +++ b/app/views/devise/mailer/password_change.text.erb @@ -0,0 +1,3 @@ +<%= t('.greeting', recipient: @resource.email) %> + +<%= t('.message') %> 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 0000000..70b22db --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.text.erb @@ -0,0 +1,8 @@ +<%= t('.greeting', recipient: @resource.email) %> + +<%= t('.instruction') %> + +<%= edit_password_url(@resource, reset_password_token: @token) %> + +<%= t('.instruction_2') %> +<%= t('.instruction_3') %> 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 0000000..239c04f --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.text.erb @@ -0,0 +1,7 @@ +<%= t('.greeting', recipient: @resource.email) %> + +<%= t('.message') %> + +<%= t('.instruction') %> + +<%= link_to t('.action'), unlock_url(@resource, unlock_token: @token) %>