mirror of https://github.com/docusealco/docuseal
- Replace bare layout with table-based 600px card design - Gray background, white content card, rounded corners - Company logo in header (falls back to account name) - Attribution footer inlined with subtle styling - Add reusable _email_button partial (blue CTA, table-based) - Update invitation, completed, documents_copy emails to use button - Auto-convert submitter link to styled button in custom email bodies - Remove deprecated _mailer_attribution and _email_attribution partials - Preserve RTL support and all existing customization flowspull/681/head
parent
51ced5ef1e
commit
29378597b3
@ -1,10 +0,0 @@
|
||||
<p>
|
||||
---
|
||||
</p>
|
||||
<p>
|
||||
<% if @current_account&.testing? %>
|
||||
<%= t('sent_using_product_name_in_testing_mode_html', product_url: "#{Docuseal::PRODUCT_EMAIL_URL}/start", product_name: Docuseal.product_name) %>
|
||||
<% else %>
|
||||
<%= t('sent_using_product_name_free_document_signing_html', product_url: "#{Docuseal::PRODUCT_EMAIL_URL}/start", product_name: Docuseal.product_name) %>
|
||||
<% end %>
|
||||
</p>
|
||||
@ -0,0 +1,9 @@
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: 24px auto;">
|
||||
<tr>
|
||||
<td style="border-radius: 6px; background-color: #1a73e8;">
|
||||
<a href="<%= local_assigns[:url] %>" target="_blank" style="display: inline-block; padding: 14px 32px; font-size: 16px; font-weight: 600; color: #ffffff; text-decoration: none; border-radius: 6px;">
|
||||
<%= local_assigns[:label] %>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1 +0,0 @@
|
||||
<%= render 'shared/email_attribution' %>
|
||||
@ -1 +1,11 @@
|
||||
<%= MarkdownToHtml.call(ReplaceEmailVariables.call(local_assigns[:content], submitter: local_assigns[:submitter], sig: local_assigns[:sig])) %>
|
||||
<% submitter = local_assigns[:submitter] %>
|
||||
<% submitter_url_pattern = submitter&.slug.present? ? "/s/#{submitter.slug}" : nil %>
|
||||
<% rendered_html = MarkdownToHtml.call(ReplaceEmailVariables.call(local_assigns[:content], submitter: submitter, sig: local_assigns[:sig])) %>
|
||||
<% if submitter_url_pattern && rendered_html.include?(submitter_url_pattern) %>
|
||||
<% button_label = I18n.t(submitter.with_signature_fields? ? :review_and_sign : :review_and_submit) %>
|
||||
<% rendered_html = rendered_html.gsub(%r{<a href="([^"]*#{Regexp.escape(submitter_url_pattern)}[^"]*)">[^<]*</a>}i) do
|
||||
url = Regexp.last_match(1)
|
||||
render(partial: 'shared/email_button', locals: { url: url, label: button_label })
|
||||
end %>
|
||||
<% end %>
|
||||
<%= rendered_html.html_safe %>
|
||||
|
||||
Loading…
Reference in new issue