diff --git a/Gemfile b/Gemfile index 2551033c..730e2c08 100644 --- a/Gemfile +++ b/Gemfile @@ -57,7 +57,7 @@ group :test do end gem "bcrypt", "~> 3.1" -gem "aws-sdk-s3", "~> 1.199" # For S3 versioning support +gem "aws-sdk-s3", "~> 1.200" # For S3 versioning support gem "aws-sdk-secretsmanager" gem "aws-sdk-lambda" gem "aws-sigv4" diff --git a/Gemfile.lock b/Gemfile.lock index 7d55f8d7..27f0f394 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,7 +82,7 @@ GEM public_suffix (>= 2.0.2, < 7.0) ast (2.4.3) aws-eventstream (1.4.0) - aws-partitions (1.1172.0) + aws-partitions (1.1173.0) aws-sdk-core (3.233.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) @@ -97,7 +97,7 @@ GEM aws-sdk-lambda (1.161.0) aws-sdk-core (~> 3, >= 3.231.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.199.1) + aws-sdk-s3 (1.200.0) aws-sdk-core (~> 3, >= 3.231.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -314,7 +314,7 @@ GEM puma (7.0.4) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.2) + rack (3.2.3) rack-session (2.1.1) base64 (>= 0.1.0) rack (>= 3.0.0) @@ -419,7 +419,7 @@ GEM rbs (>= 3, < 5) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (3.1.1) + rubyzip (3.2.0) securerandom (0.4.1) selenium-webdriver (4.36.0) base64 (~> 0.2) @@ -520,7 +520,7 @@ PLATFORMS DEPENDENCIES activerecord-session_store aws-sdk-lambda - aws-sdk-s3 (~> 1.199) + aws-sdk-s3 (~> 1.200) aws-sdk-secretsmanager aws-sdk-ses aws-sigv4 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7c807e90..4ec78bcb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,4 +1,7 @@ module ApplicationHelper + include ActionView::Helpers::AssetUrlHelper + include ActionView::Helpers::AssetTagHelper + def document_source(source) return {text: "", url: nil} unless source @@ -38,4 +41,14 @@ def safe_url(url) rescue URI::InvalidURIError nil end + + def mailer_image_url(image) + mailer_config = Rails.configuration.action_mailer[:default_url_options] + path = image_path(image) + if mailer_config[:port] + "https://#{mailer_config[:host]}:#{mailer_config[:port]}#{path}" + else + "https://#{mailer_config[:host]}#{path}" + end + end end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index f10975c1..a59b673b 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,9 +1,10 @@ class ApplicationMailer < Devise::Mailer layout "mailer" + helper :application def new_account_instructions(record, token) @token = token @resource = record - mail(to: @resource.email, subject: "Welcome! Set up your account", template_path: "users/mailer") + mail(to: @resource.email, subject: "Welcome to the Code for America PDF Accessibility App! Set up your account", template_path: "users/mailer") end end diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index d1ba3f75..333e2271 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -22,12 +22,19 @@ border-radius: 5px; } - #header { + #header, + #footer { width: 100%; margin-bottom: 32px; text-align: center; } + #footer { + font-size: 12px; + color: #6b7280 !important; + margin-bottom: 0; + } + #header img { width: 120px; display: block; @@ -43,6 +50,7 @@ #message-body { font-size: 14px; line-height: 1.5; + margin-bottom: 32px; } a { @@ -59,12 +67,13 @@
<%= yield %>
+
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 260e1c4b..8ee08d7b 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -20,7 +20,7 @@ en: confirmation_instructions: subject: "Confirmation instructions" reset_password_instructions: - subject: "Reset password instructions" + subject: "Code for America PDF Accessibility App reset password instructions" unlock_instructions: subject: "Unlock instructions" email_changed: