diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 6af9aefafc..88bbdf5ab9 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -6,6 +6,7 @@ class PaymentMailer < ApplicationMailer def authorize_payment(payment) @payment = payment + @order = @payment.order @hide_ofn_navigation = @payment.order.distributor.hide_ofn_navigation subject = I18n.t('spree.payment_mailer.authorize_payment.subject', distributor: @payment.order.distributor.name) @@ -16,6 +17,7 @@ class PaymentMailer < ApplicationMailer def authorization_required(payment) @payment = payment + @order = @payment.order shop_owner = @payment.order.distributor.owner subject = I18n.t('spree.payment_mailer.authorization_required.subject', order: @payment.order) diff --git a/app/mailers/spree/shipment_mailer.rb b/app/mailers/spree/shipment_mailer.rb index 80dd02f9ea..aab69b94d8 100644 --- a/app/mailers/spree/shipment_mailer.rb +++ b/app/mailers/spree/shipment_mailer.rb @@ -6,6 +6,7 @@ module Spree def shipped_email(shipment, delivery:) @shipment = shipment.respond_to?(:id) ? shipment : Spree::Shipment.find(shipment) + @order = @shipment.order @hide_ofn_navigation = @shipment.order.distributor.hide_ofn_navigation @delivery = delivery subject = base_subject diff --git a/app/views/payment_mailer/authorization_required.html.haml b/app/views/payment_mailer/authorization_required.html.haml index 9b390627ab..05f7658ffa 100644 --- a/app/views/payment_mailer/authorization_required.html.haml +++ b/app/views/payment_mailer/authorization_required.html.haml @@ -13,3 +13,5 @@ = t(".instructions") %p = link_to spree.edit_admin_order_url(@payment.order), spree.edit_admin_order_url(@payment.order) + += render 'shared/mailers/signoff_instance' diff --git a/app/views/payment_mailer/authorize_payment.html.haml b/app/views/payment_mailer/authorize_payment.html.haml index 136f95816a..e8c2ec9068 100644 --- a/app/views/payment_mailer/authorize_payment.html.haml +++ b/app/views/payment_mailer/authorize_payment.html.haml @@ -12,3 +12,5 @@ %p = t(".instructions") = link_to main_app.authorize_payment_url(@payment), main_app.authorize_payment_url(@payment) + += render 'shared/mailers/signoff_distributor' diff --git a/app/views/report_mailer/report_ready.html.haml b/app/views/report_mailer/report_ready.html.haml index c7cd185c2d..d6c7a13c47 100644 --- a/app/views/report_mailer/report_ready.html.haml +++ b/app/views/report_mailer/report_ready.html.haml @@ -9,3 +9,5 @@ = t(".message") %ul %li= link_to(t(".link_label", name: @blob.filename), @blob.expiring_service_url) + += render 'shared/mailers/signoff_instance' diff --git a/app/views/shared/mailers/_signoff_distributor.html.haml b/app/views/shared/mailers/_signoff_distributor.html.haml index 2794b1518b..4d8f062efc 100644 --- a/app/views/shared/mailers/_signoff_distributor.html.haml +++ b/app/views/shared/mailers/_signoff_distributor.html.haml @@ -1,5 +1,5 @@ %br -%p.callout +%p = t('.signoff') %br #{@order.distributor.contact_name} diff --git a/app/views/spree/order_mailer/cancel_email_for_shop.html.haml b/app/views/spree/order_mailer/cancel_email_for_shop.html.haml index 4c07cf37fc..173d3e96df 100644 --- a/app/views/spree/order_mailer/cancel_email_for_shop.html.haml +++ b/app/views/spree/order_mailer/cancel_email_for_shop.html.haml @@ -10,3 +10,5 @@ enterprise_for_logo: @enterprise_for_logo } = link_to t('spree.order_mailer.cancel_email_for_shop.view_cancelled_order'), spree.edit_admin_order_url(@order) + += render 'shared/mailers/signoff_instance' diff --git a/app/views/spree/shipment_mailer/shipped_email.html.haml b/app/views/spree/shipment_mailer/shipped_email.html.haml index 7892ceb89b..b4d79cbab3 100644 --- a/app/views/spree/shipment_mailer/shipped_email.html.haml +++ b/app/views/spree/shipment_mailer/shipped_email.html.haml @@ -34,3 +34,5 @@ %p.lead = t('.thanks') + += render 'shared/mailers/signoff_distributor' diff --git a/app/views/spree/user_mailer/reset_password_instructions.html.haml b/app/views/spree/user_mailer/reset_password_instructions.html.haml index 03f1f99861..814a200f77 100644 --- a/app/views/spree/user_mailer/reset_password_instructions.html.haml +++ b/app/views/spree/user_mailer/reset_password_instructions.html.haml @@ -14,4 +14,4 @@ %p = t('.issue_text') -= render 'shared/mailers/signoff' += render 'shared/mailers/signoff_instance'