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" %> diff --git a/app/views/fs/messages/_generic_message.html.erb b/app/views/fs/messages/_generic_message.html.erb index 10b910fb..aabe1a0f 100644 --- a/app/views/fs/messages/_generic_message.html.erb +++ b/app/views/fs/messages/_generic_message.html.erb @@ -1,13 +1,4 @@ - +<%= render partial: "fs/messages/style" %>
diff --git a/app/views/fs/messages/_style.html.erb b/app/views/fs/messages/_style.html.erb new file mode 100644 index 00000000..01fa83fa --- /dev/null +++ b/app/views/fs/messages/_style.html.erb @@ -0,0 +1,11 @@ + diff --git a/app/views/fs/messages/_submission.html.erb b/app/views/fs/messages/_submission.html.erb index bed56cd7..bac42e05 100644 --- a/app/views/fs/messages/_submission.html.erb +++ b/app/views/fs/messages/_submission.html.erb @@ -1,13 +1,4 @@ - +<%= render partial: "fs/messages/style" %>