Commit 2eb63e60 authored by Ray Schamp's avatar Ray Schamp

Scope message handler to confirmation iframe

parent 3b729fcb
...@@ -70,6 +70,7 @@ var Splash = injectIntl(React.createClass({ ...@@ -70,6 +70,7 @@ var Splash = injectIntl(React.createClass({
}, },
onMessage: function (e) { onMessage: function (e) {
if (e.origin != window.location.origin) return; if (e.origin != window.location.origin) return;
if (e.source != this.refs.emailConfirmationiFrame.contentWindow) return;
if (e.data == 'resend-done') { if (e.data == 'resend-done') {
this.hideEmailConfirmationModal(); this.hideEmailConfirmationModal();
} else { } else {
...@@ -299,9 +300,9 @@ var Splash = injectIntl(React.createClass({ ...@@ -299,9 +300,9 @@ var Splash = injectIntl(React.createClass({
isOpen={this.state.emailConfirmationModalOpen} isOpen={this.state.emailConfirmationModalOpen}
onRequestClose={this.hideEmailConfirmationModal} onRequestClose={this.hideEmailConfirmationModal}
style={{content: emailConfirmationStyle}}> style={{content: emailConfirmationStyle}}>
<iframe <iframe ref="emailConfirmationiFrame"
src="/accounts/email_resend_standalone/" src="/accounts/email_resend_standalone/"
{...omit(emailConfirmationStyle, 'padding')} /> {...omit(emailConfirmationStyle, 'padding')} />
</Modal> </Modal>
] : []} ] : []}
<div key="inner" className="inner"> <div key="inner" className="inner">
......
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