Browse Source

Add sender name to invitation emails

master
Joshua Rubingh 4 months ago
parent
commit
e369c805d5
  1. 1
      VRE/apps/study/models.py
  2. 2
      VRE/apps/study/templates/email/invitation_to_study/body.html
  3. 2
      VRE/apps/study/templates/email/invitation_to_study/body.txt

1
VRE/apps/study/models.py

@ -179,6 +179,7 @@ class StudyRole(MetaDataModel): @@ -179,6 +179,7 @@ class StudyRole(MetaDataModel):
url = settings.STUDY_INVITATION_LINK_DOMAIN.format(study_id=self.study.pk, jwt_token=jwt_token)
template_variables = {
'sender' : self.study.owner.display_name if sender is None else sender.display_name,
'researcher': self.researcher.display_name,
'study': self.study.name,
'invitation_link': url

2
VRE/apps/study/templates/email/invitation_to_study/body.html

@ -5,6 +5,6 @@ @@ -5,6 +5,6 @@
<a href="{{invitation_link}}">{{invitation_link}}</a>
</p>
<p>Kind regards,<br>
...</p>
{{sender}}<p>
<p><strong>Pay attention:</strong> this email contains a unique and personal invitation link which you should not share
with other persons!</p>

2
VRE/apps/study/templates/email/invitation_to_study/body.txt

@ -6,6 +6,6 @@ In order to accept this invitation, please click on the link below: @@ -6,6 +6,6 @@ In order to accept this invitation, please click on the link below:
{{invitation_link}}
Kind regards,
...
{{sender}}
**Pay attention**: this email contains a unique and personal invitation link which you should not share with other persons!
Loading…
Cancel
Save