From dda30e407aca321f369f27078076d3e05fd28b19 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 21 Sep 2015 16:03:18 -0700 Subject: Added confirmation when users request another verification email; users are no longer redirected after requesting another verification email --- web/react/components/email_verify.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web/react/components') diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 92123956f..4d4d489bb 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -10,12 +10,14 @@ export default class EmailVerify extends React.Component { this.state = {}; } handleResend() { - window.location.href = window.location.href + '&resend=true'; + const newAddress = window.location.href.replace('?resend_success=true', '').replace('&resend_success=true', ''); + window.location.href = newAddress + '&resend=true'; } render() { var title = ''; var body = ''; var resend = ''; + let resendConfirm = ''; if (this.props.isVerified === 'true') { title = global.window.config.SiteName + ' Email Verified'; body =

Your email has been verified! Click -1) { + resendConfirm =


{' Verification email sent.'}

; + } } return ( @@ -41,6 +46,7 @@ export default class EmailVerify extends React.Component {
{body} {resend} + {resendConfirm}
-- cgit v1.2.3-1-g7c22 From b4be8eb554d4de1de5b4928a37cb72c34d565487 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 21 Sep 2015 17:03:08 -0700 Subject: Minor changes to how resend status is passed --- web/react/components/email_verify.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 4d4d489bb..8d3f15525 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -10,14 +10,14 @@ export default class EmailVerify extends React.Component { this.state = {}; } handleResend() { - const newAddress = window.location.href.replace('?resend_success=true', '').replace('&resend_success=true', ''); + const newAddress = window.location.href.replace('&resend_success=true', ''); window.location.href = newAddress + '&resend=true'; } render() { var title = ''; var body = ''; var resend = ''; - let resendConfirm = ''; + var resendConfirm = ''; if (this.props.isVerified === 'true') { title = global.window.config.SiteName + ' Email Verified'; body =

Your email has been verified! Click -1) { + if (this.props.resendSuccess) { resendConfirm =


{' Verification email sent.'}

; } } @@ -57,10 +57,12 @@ export default class EmailVerify extends React.Component { EmailVerify.defaultProps = { isVerified: 'false', teamURL: '', - userEmail: '' + userEmail: '', + resendSuccess: 'false' }; EmailVerify.propTypes = { isVerified: React.PropTypes.string, teamURL: React.PropTypes.string, - userEmail: React.PropTypes.string + userEmail: React.PropTypes.string, + resendSuccess: React.PropTypes.string }; -- cgit v1.2.3-1-g7c22