Problem/Motivation

  1. Fix the review / approval notification email as an HTML email
  2. Refactor to integrate notification email functions in between aws_cloud and k8s module into cloud module

Issue fork cloud-3198860

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sekinet created an issue. See original summary.

sekinet’s picture

StatusFileSize
new42.81 KB
sekinet’s picture

Status: Active » Needs review

@yas A patch has been created. Could you please check it?

yas’s picture

Status: Needs review » Needs work

@sekinet

Thank you for adding the refactoring. The patch looks great but I have one comment above. Could you please check it? Thanks.

sekinet’s picture

StatusFileSize
new42.81 KB
sekinet’s picture

Status: Needs work » Needs review

@yas Thank you for your comments. I've fixed it.

sekinet’s picture

StatusFileSize
new43.48 KB
sekinet’s picture

@yas Fixed the PhpMail() module to send HTML mails.
Could you please check it? Thanks

yas’s picture

Status: Needs review » Needs work

@sekinet

Thank you for the update. I tested the patch; and it fixed the HTML email, however:

  1. The Approve link is broken with some break characters %0D%20 → CRLF + ' ' (white space). e.g. http://dev1.dataninja.net/clouds/desi%0D%20gn/server_template/aws_us_wes...
    This should be: http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/15...
  2. The HTML button portion has some other broken replacement, e.g. ...<br />href="http://dev1...

Could you please double-check?

sekinet’s picture

StatusFileSize
new43.76 KB
sekinet’s picture

sekinet’s picture

StatusFileSize
new43.54 KB
sekinet’s picture

Status: Needs work » Needs review

@yas
Thank you for your confirmation.
Depending on the length of the url, there was a line break in the middle of the url, resulting in broken characters.
We have added a style to the div tag to fix it so that it does not break lines.

yas’s picture

Status: Needs review » Needs work
StatusFileSize
new601.42 KB

@sekinet

Thank you for the update. I tested the patch however the link didn't work:

05.png

The following is the email body:

The following AWS launch template request is waiting for your review. 
<br />
<br />--------------------------------
<br />Launch template name: test-naoi
<br />Launch template url: <a href="http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14">http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14</a>
<br />Launch template edit link: <a href="http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14/edit">http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14/edit</a>
<br />Launch template changed: 2021-02-21 20:43:23 -0800
<br /><div style="display: inline-block; _display: inline;"><!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"xmlns:w="urn:schemas-microsoft-com:office:word"href="http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14/approve"style="height:50px;v-text-anchor:middle;width:200px;"arcsize="8%" stroke="f" fillcolor="#326de6"><w:anchorlock/><center><![endif]--><a hr
 ef="http://dev1.dataninja.net/clouds/design/server_template/aws_us_west_2/14/approve"style="background-color:#326de6;border-radius:4px;padding:10px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:px;text-align:center;text-decoration:none;width:px;-webkit-text-size-adjust:none;">Approve This Template</a><!--[if mso]></center></v:roundrect><![endif]--></div>
<br />-------------------------------- 
<br />
<br />Sent from <a href="http://dev1.dataninja.net">http://dev1.dataninja.net</a>

Could you please check the HTML again? FYI, it looks there are no space before and after the href link.

sekinet’s picture

StatusFileSize
new43.54 KB
sekinet’s picture

Status: Needs work » Needs review

@yas Thank you for your comment.
I've fixed it, could you please check it?

yas’s picture

Status: Needs review » Reviewed & tested by the community

@sekinet

Thank you for fixing the issue. I tested the patch and it looks good to me now. I'll merge the patch to 3.x and close this issue as Fixed.

20210221a.png
20210221b.png
20210221c.png

  • yas committed bdde6ee on 3.x authored by sekinet
    Issue #3198860 by sekinet, yas: Fix the review / approval notification...
yas’s picture

Issue summary: View changes
StatusFileSize
new657.98 KB
new288.63 KB
new349.43 KB
yas’s picture

yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.