1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-16 01:55:07 +01:00
onion/js/components/ascribe_modal/modal_signup.js
ddejongh 56d32efcc0 password reset
modal switch problems
2015-06-15 15:28:53 +02:00

32 lines
1019 B
JavaScript

'use strict';
import React from 'react';
import ModalWrapper from './modal_wrapper';
import SignupForm from '../ascribe_forms/form_signup';
import GlobalNotificationModel from '../../models/global_notification_model';
import GlobalNotificationActions from '../../actions/global_notification_actions';
let SignupModal = React.createClass({
handleSignupSuccess(response){
let notificationText = 'We sent an email to your address ' + response.user.email + ', please confirm.';
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
GlobalNotificationActions.appendGlobalNotification(notification);
},
render() {
return (
<ModalWrapper
button={this.props.button}
title='Create an account'
handleSuccess={this.handleSignupSuccess}
tooltip='Sign up to ascribe'>
<SignupForm />
</ModalWrapper>
);
}
});
export default SignupModal;