import React from 'react'; import styles from './styles.css'; import Button from 'coral-ui/components/Button'; import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations'; const lang = new I18n(translations); class ForgotContent extends React.Component { constructor (props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); } handleSubmit (e) { e.preventDefault(); this.props.fetchForgotPassword(this.emailInput.value); } render () { const {changeView, auth} = this.props; const {passwordRequestSuccess, passwordRequestFailure} = auth; return (

{lang.t('signIn.recoverPassword')}

this.emailInput = input} type="text" style={{fontSize: 16}} id="email" name="email" />
{ passwordRequestSuccess ?

{passwordRequestSuccess}

: null } { passwordRequestFailure ?

{passwordRequestFailure}

: null }
{lang.t('signIn.needAnAccount')} changeView('SIGNUP')}>{lang.t('signIn.register')} {lang.t('signIn.alreadyHaveAnAccount')} changeView('SIGNIN')}>{lang.t('signIn.signIn')}
); } } export default ForgotContent;