mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-01 06:41:41 +00:00
Add signoff to all remaining emails which didn't have one yet
To do so the shipment mailer and payment mailers need to know the @order Remove the 'callout' class from distributor signoff for uniformity and to keep the callout available for call to actions only Remaining translation keys for emails will be re-organized in a separate commit
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%br
|
||||
%p.callout
|
||||
%p
|
||||
= t('.signoff')
|
||||
%br
|
||||
#{@order.distributor.contact_name}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -34,3 +34,5 @@
|
||||
|
||||
%p.lead
|
||||
= t('.thanks')
|
||||
|
||||
= render 'shared/mailers/signoff_distributor'
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
%p
|
||||
= t('.issue_text')
|
||||
|
||||
= render 'shared/mailers/signoff'
|
||||
= render 'shared/mailers/signoff_instance'
|
||||
|
||||
Reference in New Issue
Block a user