(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1148:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var s=a(16),r=a.n(s),n=a(6),l=a.n(n),i=a(28),c=a(1123);function o(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(c.a,{onClick:this.props.onClick,to:this.props.url},l.a.createElement(i.c,{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})),l.a.createElement(i.c,{id:"web.header.back",defaultMessage:"Back"})))}}o(d,"propTypes",{url:r.a.string,onClick:r.a.func}),o(d,"defaultProps",{url:"/"})},1962:function(e,t,a){"use strict";a.r(t);var s=a(7),r=a(307),n=a(21),l=(a(51),a(71),a(35),a(16)),i=a.n(l),c=a(6),o=a.n(c),d=a(28),u=a(52),m=a(1148),p=a(1142),f=a(29);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 o.a.PureComponent{constructor(...e){super(...e),h(this,"state",{error:null,updateText:null}),h(this,"resetForm",o.a.createRef()),h(this,"emailInput",o.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:o.a.createElement(d.c,{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:o.a.createElement("div",{id:"passwordResetEmailSent",className:"reset-form alert alert-success"},o.a.createElement(d.c,{id:"password_send.link",defaultMessage:"If the account exists, a password reset email will be sent to:"}),o.a.createElement("div",null,o.a.createElement("b",null,t)),o.a.createElement("br",null),o.a.createElement(d.c,{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=o.a.createElement("div",{className:"form-group has-error"},o.a.createElement("label",{className:"control-label"},this.state.error)));let t="form-group";return e&&(t+=" has-error"),o.a.createElement("div",null,o.a.createElement(m.a,null),o.a.createElement("div",{className:"col-sm-12"},o.a.createElement("div",{className:"signup-team__container"},o.a.createElement("h3",null,o.a.createElement(d.c,{id:"password_send.title",defaultMessage:"Password Reset"})),this.state.updateText,o.a.createElement("form",{onSubmit:this.handleSendLink,ref:this.resetForm},o.a.createElement("p",null,o.a.createElement(d.c,{id:"password_send.description",defaultMessage:"To reset your password, enter the email address you used to sign up"})),o.a.createElement("div",{className:t},o.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,o.a.createElement("button",{id:"passwordResetButton",type:"submit",className:"btn btn-primary"},o.a.createElement(d.c,{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=23.48fb6d8ef00e5ea856bc.js.map