Commit 854afcd8 authored by John Red Medrano's avatar John Red Medrano

Merge pull request #670 in RMS/api-main-service from red-develop to product-dev

* commit '336380e5':
  added variable link_verb on email template for on behalf
parents b8cec020 336380e5
......@@ -86,8 +86,9 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
active_user = self.request.user.name
admin = request.user.email
linking_verb = 'as'
args = [behalf_name, 'removed', active_user, behalf_email, admin]
args = [behalf_name, 'Removed', active_user, behalf_email, admin, linking_verb]
main_threading(args, sender.on_behalf)
return Response(status=status.HTTP_204_NO_CONTENT)
......@@ -116,13 +117,14 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
active_user = self.request.user.name
action = 'Added'
admin = request.user.email
linking_verb = 'on'
for data in data_cms_settings:
recipient = User.objects.get(
code=str(data['behalf_user'])
)
args = [recipient.name, action, active_user, recipient.email, admin]
args = [recipient.name, action, active_user, recipient.email, admin, linking_verb]
main_threading(args, sender.on_behalf)
if serializer.is_valid(raise_exception=True):
......
......@@ -606,6 +606,7 @@ def on_behalf(args):
recipient = args[3]
admin = args[4]
admin = args[5]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-ONBEHALF.html'), 'r')
......
......@@ -9,7 +9,7 @@
<h3 style="color:#888888;">{action} on Behalf</h3><br>
<p>Dear {name},</p><br>
<p>Please be informed that {active_user} {action} you on their behalf for change requests under Actions on Behalf. </p><br>
<p>Please be informed that {active_user} {action} you {linking_verb} their behalf for change requests under Actions on Behalf. </p><br>
<!-- <p>Please be informed that {active_user} {action} you as on behalf user for change request. </p><br> -->
<p>Sincerely,</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment