Commit f280a205 authored by John Red Medrano's avatar John Red Medrano

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

* commit '480de694':
  fixing issue on verb
parents dc4cfb17 480de694
......@@ -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, 'as']
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, 'on']
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,8 +606,7 @@ def on_behalf(args):
recipient = args[3]
admin = args[4]
verb = args[5]
print(verb)
linking_verb = args[5]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-ONBEHALF.html'), 'r')
......@@ -616,6 +615,7 @@ def on_behalf(args):
FC = FC.replace('{name}', name)
FC = FC.replace('{action}', action)
FC = FC.replace('{active_user}', active_user)
FC = FC.replace('{linking_verb}', linking_verb)
try:
send_mail(
......
......@@ -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 {verb} 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