Minor changes to how resend status is passed
Этот коммит содержится в:
@@ -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 = <p>Your email has been verified! Click <a href={this.props.teamURL + '?email=' + this.props.userEmail}>here</a> to log in.</p>;
|
||||
@@ -32,7 +32,7 @@ export default class EmailVerify extends React.Component {
|
||||
Resend Email
|
||||
</button>
|
||||
);
|
||||
if (window.location.href.indexOf('resend_success=true') > -1) {
|
||||
if (this.props.resendSuccess) {
|
||||
resendConfirm = <div><br /><p className='alert alert-success'><i className='fa fa-check'></i>{' Verification email sent.'}</p></div>;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ global.window.setupVerifyPage = function setupVerifyPage(props) {
|
||||
isVerified={props.IsVerified}
|
||||
teamURL={props.TeamURL}
|
||||
userEmail={props.UserEmail}
|
||||
resendSuccess={props.ResendSuccess}
|
||||
/>,
|
||||
document.getElementById('verify')
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user