(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1240:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));a(109);var s=a(133),r=a.n(s),n=a(4),l=a.n(n),i=a(1213),o=a(1211);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class d extends l.a.PureComponent{render(){return l.a.createElement("div",{id:"back_button",className:"signup-header"},l.a.createElement(o.Link,{onClick:this.props.onClick,to:this.props.url},l.a.createElement(i.a,{id:"generic_icons.back",defaultMessage:"Back Icon"},e=>l.a.createElement("span",{id:"back_button_icon",className:"fa fa-1x fa-angle-left",title:e.toString()})),l.a.createElement(i.a,{id:"web.header.back",defaultMessage:"Back"})))}}c(d,"propTypes",{url:r.a.string,onClick:r.a.func}),c(d,"defaultProps",{url:"/"})},2218:function(e,t,a){"use strict";a.r(t);var s=a(7),r=a(290),n=a(15),l=(a(58),a(82),a(31),a(133)),i=a.n(l),o=a(4),c=a.n(o),d=a(1213),u=a(47),m=a(1240),p=a(1234),f=a(12);function h(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class b extends c.a.PureComponent{constructor(...e){super(...e),h(this,"state",{error:null,updateText:null}),h(this,"resetForm",c.a.createRef()),h(this,"emailInput",c.a.createRef()),h(this,"handleSendLink",async e=>{e.preventDefault();const t=this.emailInput.current.value.trim().toLowerCase();if(!t||!Object(u.isEmail)(t))return void this.setState({error:c.a.createElement(d.a,{id:"password_send.error",defaultMessage:"Please enter a valid email address."})});this.setState({error:null});const{data:a,error:s}=await this.props.actions.sendPasswordResetEmail(t);a?(this.setState({error:null,updateText:c.a.createElement("div",{id:"passwordResetEmailSent",className:"reset-form alert alert-success"},c.a.createElement(d.a,{id:"password_send.link",defaultMessage:"If the account exists, a password reset email will be sent to:"}),c.a.createElement("div",null,c.a.createElement("b",null,t)),c.a.createElement("br",null),c.a.createElement(d.a,{id:"password_send.checkInbox",defaultMessage:"Please check your inbox."}))}),this.resetForm.current&&(this.resetForm.current.hidden=!0)):s&&this.setState({error:s.message,update_text:null})})}render(){let e=null;this.state.error&&(e=c.a.createElement("div",{className:"form-group has-error"},c.a.createElement("label",{className:"control-label"},this.state.error)));let t="form-group";return e&&(t+=" has-error"),c.a.createElement("div",null,c.a.createElement(m.a,null),c.a.createElement("div",{className:"col-sm-12"},c.a.createElement("div",{className:"signup-team__container"},c.a.createElement("h3",null,c.a.createElement(d.a,{id:"password_send.title",defaultMessage:"Password Reset"})),this.state.updateText,c.a.createElement("form",{onSubmit:this.handleSendLink,ref:this.resetForm},c.a.createElement("p",null,c.a.createElement(d.a,{id:"password_send.description",defaultMessage:"To reset your password, enter the email address you used to sign up"})),c.a.createElement("div",{className:t},c.a.createElement(p.a,{id:"passwordResetEmailInput",type:"email",className:"form-control",name:"email",placeholder:{id:Object(f.b)("password_send.email"),defaultMessage:"Email"},ref:this.emailInput,spellCheck:"false",autoFocus:!0})),e,c.a.createElement("button",{id:"passwordResetButton",type:"submit",className:"btn btn-primary"},c.a.createElement(d.a,{id:"password_send.reset",defaultMessage:"Reset my password"}))))))}}h(b,"propTypes",{actions:i.a.shape({sendPasswordResetEmail:i.a.func.isRequired}).isRequired});t.default=Object(r.connect)(null,e=>({actions:Object(s.bindActionCreators)({sendPasswordResetEmail:n.sendPasswordResetEmail},e)}))(b)}}]);
//# sourceMappingURL=21.d41ad97f44d431fbd39a.js.map