webpackJsonp([24],{2503:function(e,t,a){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=a(239),l=r(s),o=a(238),n=r(o),d=a(242),u=r(d),f=a(240),c=r(f),i=a(241),m=r(i),p=a(21),h=r(p),w=a(13),_=r(w),v=a(246),g=r(v),E=a(697),M=a(717),N=a(43),P=r(N),b=a(698),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(b),S=function(t){function a(e){(0,n.default)(this,a);var t=(0,c.default)(this,(a.__proto__||(0,l.default)(a)).call(this,e));return t.handlePasswordReset=t.handlePasswordReset.bind(t),t.state={},t}return(0,m.default)(a,t),(0,u.default)(a,[{key:"handlePasswordReset",value:function(e){var t=this;e.preventDefault();var a=g.default.findDOMNode(this.refs.password).value;if(!a||a.length<P.default.MIN_PASSWORD_LENGTH)return void this.setState({error:_.default.createElement(E.FormattedMessage,{id:"password_form.error",defaultMessage:"Please enter at least {chars} characters.",values:{chars:P.default.MIN_PASSWORD_LENGTH}})});this.setState({error:null}),(0,M.resetPassword)(new URLSearchParams(this.props.location.search).get("token"),a,function(){t.setState({error:null})},function(e){t.setState({error:e.message})})}},{key:"render",value:function(){var t=null;this.state.error&&(t=_.default.createElement("div",{className:"form-group has-error"},_.default.createElement("label",{className:"control-label"},this.state.error)));var a="form-group";return t&&(a+=" has-error"),_.default.createElement("div",{className:"col-sm-12"},_.default.createElement("div",{className:"signup-team__container"},_.default.createElement("h3",null,_.default.createElement(E.FormattedMessage,{id:"password_form.title",defaultMessage:"Password Reset"})),_.default.createElement("form",{onSubmit:this.handlePasswordReset},_.default.createElement("p",null,_.default.createElement(E.FormattedMessage,{id:"password_form.enter",defaultMessage:"Enter a new password for your {siteName} account.",values:{siteName:e.window.mm_config.SiteName}})),_.default.createElement("div",{className:a},_.default.createElement("input",{type:"password",className:"form-control",name:"password",ref:"password",placeholder:y.localizeMessage("password_form.pwd","Password"),spellCheck:"false"})),t,_.default.createElement("button",{type:"submit",className:"btn btn-primary"},_.default.createElement(E.FormattedMessage,{id:"password_form.change",defaultMessage:"Change my password"})))))}}]),a}(_.default.Component);S.defaultProps={},S.propTypes={params:h.default.object.isRequired,location:h.default.object.isRequired},t.default=S}).call(t,a(22))}});
//# sourceMappingURL=24.639f8185f08d7c2e52fd.js.map