fix(email): add better password change link for certain emails #93
Conversation
| @@ -162,7 +169,8 @@ module.exports = function (log) { | |||
| email: message.email, | |||
| link: link, | |||
| supportUrl: this.supportUrl, | |||
| supportLinkAttributes: this._supportLinkAttributes() | |||
| supportLinkAttributes: this._supportLinkAttributes(), | |||
| passwordChangeUrl: this._initiatePasswordChange() | |||
rfk
Oct 14, 2015
Member
naming nit: passwordChangeLinkAttributes or similar for consistency, since it's not just the URL?
naming nit: passwordChangeLinkAttributes or similar for consistency, since it's not just the URL?
| @@ -321,7 +334,8 @@ module.exports = function (log) { | |||
| link: link, | |||
| oneClickLink: oneClickLink, | |||
| supportUrl: this.supportUrl, | |||
| supportLinkAttributes: this._supportLinkAttributes() | |||
| supportLinkAttributes: this._supportLinkAttributes(), | |||
| passwordChangeUrl: this._initiatePasswordChange() | |||
rfk
Oct 14, 2015
Member
Wow that's a lot of identical changes...I wonder if we should factor these links out into some common set of attributes that are included in every render, so that we can manage them in a single place.
Wow that's a lot of identical changes...I wonder if we should factor these links out into some common set of attributes that are included in every render, so that we can manage them in a single place.
vladikoff
Oct 15, 2015
Author
Contributor
opened https://github.com/mozilla/fxa-auth-mailer/issues/94 so we can merge this and cut strings
opened https://github.com/mozilla/fxa-auth-mailer/issues/94 so we can merge this and cut strings
|
@vladikoff travis bustage? |
|
Also if I understand the rules correctly (thanks to a recent refresher from @shane-tomlinson) then we shouldn't merge this l10n-affecting string change until after we cut the next train...? |
|
will fix the tests and ping @shane-tomlinson before cutting strings.... |
We are in the "merge new strings!" window, until I go to sleep tonight. |
| @@ -43,7 +43,7 @@ P.all( | |||
| service: 'service', | |||
| } | |||
|
|
|||
| var supportHtmlLink = new RegExp('<a href="' + config.mail.supportUrl + '" style="color: #0095dd; text-decoration: none;">Mozilla Support</a>') | |||
| var supportHtmlLink = new RegExp('<a href="' + config.mail.supportUrl + '" style="color: #0095dd; text-decoration: none; font-family: sans-serif;">Mozilla Support</a>') | |||
shane-tomlinson
Oct 15, 2015
Member
Should we add a "Change Password" link test too?
Should we add a "Change Password" link test too?
| @@ -27,7 +27,7 @@ <h1 style="font-family: sans-serif; font-weight: normal; margin: 0 0 24px 0; tex | |||
| <td border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> | |||
| <br/> | |||
| <p class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap:break-word"> | |||
| {{t "This is an automated email; if you received it in error, no action is required."}} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>"}}} | |||
| {{t "This is an automated email; if you did not authorize this action, then <a %(passwordChangeLinkAttributes)s>please change your password.</a>" }} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>"}}} | |||
shane-tomlinson
Oct 15, 2015
Member
Ahh, since this now has HTML, you'll have to replace {{ with {{{or else the HTML will be escaped.
Ahh, since this now has HTML, you'll have to replace {{ with {{{or else the HTML will be escaped.
shane-tomlinson
Oct 15, 2015
Member
That's my theory anyways.
That's my theory anyways.
fix(email): add better password change link for certain emails
| @@ -130,7 +136,8 @@ module.exports = function (log) { | |||
| link: link, | |||
| oneClickLink: oneClickLink, | |||
| supportUrl: this.supportUrl, | |||
| supportLinkAttributes: this._supportLinkAttributes() | |||
| supportLinkAttributes: this._supportLinkAttributes(), | |||
| passwordChangeLinkAttributes: this._initiatePasswordChange() | |||
shane-tomlinson
Oct 15, 2015
Member
Should _initiatePasswordChange be renamed to _passwordChangeLinkAttributes to stay consistent?
Should _initiatePasswordChange be renamed to _passwordChangeLinkAttributes to stay consistent?
Fix #78