allow to edit email templates

This commit is contained in:
Alex Turchyn
2023-08-20 00:10:54 +03:00
parent 8e6639d891
commit 6b4e7c2264
6 changed files with 180 additions and 37 deletions
@@ -1,3 +1,7 @@
<p>Hi <%= @user.first_name %>,</p>
<p><%= @submitter.email %> has completed the "<%= @submitter.submission.template.name %>" form.</p>
<p><%= link_to 'View Submission', submission_url(@submitter.submission) %></p>
<% if @email_config %>
<%= auto_link(simple_format(h(ReplaceEmailVariables.call(@email_config.value['body'], submitter: @submitter)))) %>
<% else %>
<p>Hi <%= @user.first_name %>,</p>
<p><%= @submitter.email %> has completed the "<%= @submitter.submission.template.name %>" form.</p>
<p><%= link_to 'View Submission', submission_url(@submitter.submission) %></p>
<% end %>
@@ -1,13 +1,17 @@
<p>Hi there,</p>
<p>Please check the copy of your "<%= @submitter.submission.template.name %>" submission in the email attachments.</p>
<p>Alternatively, you can download the copy using:</p>
<% @documents.each do |document| %>
<ul>
<li>
<%= link_to document.filename.to_s, rails_blob_url(document) %>
</li>
</ul>
<% if @email_config %>
<%= auto_link(simple_format(h(ReplaceEmailVariables.call(@email_config.value['body'], submitter: @submitter)))) %>
<% else %>
<p>Hi there,</p>
<p>Please check the copy of your "<%= @submitter.submission.template.name %>" submission in the email attachments.</p>
<p>Alternatively, you can download the copy using:</p>
<% @documents.each do |document| %>
<ul>
<li>
<%= link_to document.filename.to_s, rails_blob_url(document) %>
</li>
</ul>
<% end %>
<p>
Thanks,<br><%= @current_account.name %>
</p>
<% end %>
<p>
Thanks,<br><%= @current_account.name %>
</p>