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
+19
View File
@@ -22,6 +22,8 @@
#
class AccountConfig < ApplicationRecord
SUBMITTER_INVITATION_EMAIL_KEY = 'submitter_invitation_email'
SUBMITTER_COMPLETED_EMAIL_KEY = 'submitter_completed_email'
SUBMITTER_DOCUMENTS_COPY_EMAIL_KEY = 'submitter_documents_copy_email'
DEFAULT_VALUES = {
SUBMITTER_INVITATION_EMAIL_KEY => {
@@ -32,6 +34,23 @@ class AccountConfig < ApplicationRecord
"Please contact us by replying to this email if you didn't request this.\n\n" \
"Thanks,\n" \
'{{account.name}}'
},
SUBMITTER_COMPLETED_EMAIL_KEY => {
'subject' => '{{submitter.email}} has completed the "{{template.name}}" form',
'body' => "Hi,\n\n" \
"{{submitter.email}} has completed the \"{{template.name}}\" form:\n\n" \
"{{submission.link}}\n\n" \
"Thanks,\n" \
'{{account.name}}'
},
SUBMITTER_DOCUMENTS_COPY_EMAIL_KEY => {
'subject' => 'Your copy of documents',
'body' => "Hi there,\n\n" \
"Please check the copy of your \"{{template.name}}\" submission in the email attachments.\n" \
"Alternatively, you can download the copy using:\n\n" \
"{{documents.links}}\n\n" \
"Thanks,\n" \
'{{account.name}}'
}
}.freeze