diff --git a/app/helpers/fs/message_helper.rb b/app/helpers/fs/message_helper.rb index 0d980393..a7b779dc 100644 --- a/app/helpers/fs/message_helper.rb +++ b/app/helpers/fs/message_helper.rb @@ -17,6 +17,7 @@ def self.build_html_visualization_from_form(message) return unless message.form_object&.unsigned_content template = Nokogiri::XSLT(message.form.xslt_txt) - ActionController::Base.helpers.simple_format(template.transform(message.form_object.xml_unsigned_content).to_s) + + ActionController::Base.new.render_to_string('fs/messages/_style', layout: false, locals: { message: message }) + ActionController::Base.helpers.simple_format(template.transform(message.form_object.xml_unsigned_content).to_s) end end diff --git a/app/views/fs/messages/_delivery_report.html.erb b/app/views/fs/messages/_delivery_report.html.erb index bb573ab2..f959eb45 100644 --- a/app/views/fs/messages/_delivery_report.html.erb +++ b/app/views/fs/messages/_delivery_report.html.erb @@ -1,13 +1,4 @@ - +<%= render partial: "fs/messages/style" %>