new hidden 'allow_staged_accounts' setting

This commit is contained in:
Régis Hanol
2015-11-24 16:58:26 +01:00
parent 09bfe49254
commit 0d54c18c8b
11 changed files with 94 additions and 159 deletions

View File

@@ -59,13 +59,17 @@ module Email
return unless html_override = @opts[:html_override]
if @opts[:add_unsubscribe_link]
if response_instructions = @template_args[:respond_instructions]
respond_instructions = PrettyText.cook(response_instructions).html_safe
html_override.gsub!("%{respond_instructions}", respond_instructions)
end
unsubscribe_link = PrettyText.cook(I18n.t('unsubscribe_link', template_args)).html_safe
html_override.gsub!("%{unsubscribe_link}", unsubscribe_link)
else
html_override.gsub!("%{unsubscribe_link}", "")
end
if response_instructions = @template_args[:respond_instructions]
respond_instructions = PrettyText.cook(response_instructions).html_safe
html_override.gsub!("%{respond_instructions}", respond_instructions)
else
html_override.gsub!("%{respond_instructions}", "")
end
styled = Email::Styles.new(html_override, @opts)