From 3e9d2e371e310d022cde09627a2dff6665321d0e Mon Sep 17 00:00:00 2001 From: Nuwan Date: Wed, 22 Jan 2025 09:53:15 +0530 Subject: [PATCH] change mailer layouts change the layout of the updating_email and updated_email templates --- ruby/lib/jam_ruby/app/mailers/user_mailer.rb | 8 ++--- .../user_mailer/updated_email.html.erb | 10 ++++-- .../user_mailer/updating_email.html.erb | 33 +++++++++++++++++-- web/config/locales/en.yml | 17 +++++++++- 4 files changed, 59 insertions(+), 9 deletions(-) diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index 2c4108565..27a86d909 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -369,9 +369,9 @@ module JamRuby sendgrid_substitute('@USERID', [user.id]) sendgrid_unique_args :type => "updating_email" - mail(:to => user.update_email, :subject => "JamKazam Email Change Confirmation") do |format| + mail(:to => user.update_email, :subject => I18n.t('user_mailer.updating_email.subject')) do |format| format.text - format.html + format.html{ render layout: "user_mailer_beta" } end end @@ -383,9 +383,9 @@ module JamRuby sendgrid_substitute('@USERID', [user.id]) sendgrid_unique_args :type => "updated_email" - mail(:to => user.email, :subject => "JamKazam Email Changed") do |format| + mail(:to => user.email, :subject => "Your JamKazam account email address has been updated") do |format| format.text - format.html + format.html{ render layout: "user_mailer_beta" } end end diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb index 6a27ed8a7..9e3b8fba0 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb @@ -1,3 +1,9 @@ -<% provide(:title, 'JamKazam Email Confirmed') %> +<% provide(:title, I18n.t('user_mailer.updated_email.subject')) %> -<%= @user.email %> has been confirmed as your new email address. \ No newline at end of file +

<%= I18n.t 'user_mailer.updated_email.greeting' -%> <%= @user.first_name -%> -

+ +

<%= I18n.t 'user_mailer.updated_email.paragraph1' -%><%= @user.email %>

+ +

<%= I18n.t 'user_mailer.updated_email.best_wishes' -%>
+ <%= I18n.t 'user_mailer.updated_email.signature' -%> +

\ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb index 704636eaa..a48f5e753 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb @@ -1,3 +1,32 @@ -<% provide(:title, 'Please Confirm New JamKazam Email') %> +<% provide(:title, I18n.t('user_mailer.updating_email.subject')) %> -Please click the following link to confirm your change in email: confirm email. \ No newline at end of file +

<%= I18n.t 'user_mailer.updating_email.greeting' -%> <%= @user.first_name -%> -

+ +

<%= I18n.t 'user_mailer.updating_email.paragraph1' -%>

+ +
+ <%= I18n.t 'user_mailer.updating_email.confirm_change' -%> +
+ +

<%= I18n.t 'user_mailer.updating_email.paragraph2' -%>

+ +

<%= I18n.t 'user_mailer.updating_email.best_wishes' -%>
+ <%= I18n.t 'user_mailer.updating_email.signature' -%> +

\ No newline at end of file diff --git a/web/config/locales/en.yml b/web/config/locales/en.yml index c69651914..4e6e25cc3 100644 --- a/web/config/locales/en.yml +++ b/web/config/locales/en.yml @@ -22,7 +22,22 @@ en: paragraph2: " If you have received this email but aren’t familiar with JamKazam, someone has registered at our website using your email address, and you can use the unsubscribe link below to stop receiving emails from us." best_wishes: "Best Regards," signature: "Team JamKazam" - + updating_email: + subject: |- + Please confirm the change you made to your JamKazam account email (ACTION NEEDED) + greeting: "Hello" + paragraph1: "We received a request to change the email address associated with your JamKazam account. If you made this change, please click the button below to confirm this change." + confirm_change: "Confirm Email Change" + paragraph2: "If you did not change your JamKazam account email address, we strongly recommend you sign into your JamKazam account, change your account password, and update your account email address immediately to protect the security of your account." + best_wishes: "Best Regards," + signature: "Team JamKazam" + updated_email: + subject: "Your JamKazam account email address has been updated" + greeting: "Hello" + paragraph1: "Thank you for confirming the update of your JamKazam account email address to " + best_wishes: "Best Regards," + signature: "Team JamKazam" + new_musicians_match: subject: "New musicians with good Internet connections to you have joined JamKazam!" greeting: "Hi"