webpackJsonp([52],{1847:function(e,t,a){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(6),s=l(r),n=a(4),u=l(n),m=a(5),d=l(m),i=a(7),o=l(i),c=a(8),f=l(c),p=a(223),E=a(9),h=l(E),_=a(83),N=a(1819),g=l(N),M=a(2),v=l(M),y=a(1),b=l(y),x=a(45),T=l(x),A=a(18),F=function(e){function t(e){(0,u.default)(this,t);var a=(0,o.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e));return a.submitNext=a.submitNext.bind(a),a.state={},a}return(0,f.default)(t,e),(0,d.default)(t,[{key:"componentDidMount",value:function(){(0,p.trackEvent)("signup","signup_team_01_name")}},{key:"submitNext",value:function(e){e.preventDefault();var t=T.default.findDOMNode(this.refs.name).value.trim();return t?t.length<h.default.MIN_TEAMNAME_LENGTH||t.length>h.default.MAX_TEAMNAME_LENGTH?void this.setState({nameError:b.default.createElement(A.FormattedMessage,{id:"create_team.display_name.charLength",defaultMessage:"Name must be {min} or more characters up to a maximum of {max}. You can add a longer team description later.",values:{min:h.default.MIN_TEAMNAME_LENGTH,max:h.default.MAX_TEAMNAME_LENGTH}})}):(this.props.state.wizard="team_url",this.props.state.team.display_name=t,this.props.state.team.name=(0,_.cleanUpUrlable)(t),void this.props.updateParent(this.props.state)):void this.setState({nameError:b.default.createElement(A.FormattedMessage,{id:"create_team.display_name.required",defaultMessage:"This field is required"})})}},{key:"handleFocus",value:function(e){e.preventDefault(),e.currentTarget.select()}},{key:"render",value:function(){var e=null,t="form-group";return this.state.nameError&&(e=b.default.createElement("label",{className:"control-label"},this.state.nameError),t+=" has-error"),b.default.createElement("div",null,b.default.createElement("form",null,b.default.createElement("img",{className:"signup-team-logo",src:g.default}),b.default.createElement("h2",null,b.default.createElement(A.FormattedMessage,{id:"create_team.display_name.teamName",defaultMessage:"Team Name"})),b.default.createElement("div",{className:t},b.default.createElement("div",{className:"row"},b.default.createElement("div",{className:"col-sm-9"},b.default.createElement("input",{type:"text",ref:"name",className:"form-control",placeholder:"",maxLength:"128",defaultValue:this.props.state.team.display_name,autoFocus:!0,onFocus:this.handleFocus,spellCheck:"false"}))),e),b.default.createElement("div",null,b.default.createElement(A.FormattedMessage,{id:"create_team.display_name.nameHelp",defaultMessage:"Name your team in any language. Your team name shows in menus and headings."})),b.default.createElement("button",{type:"submit",className:"btn btn-primary margin--extra",onClick:this.submitNext},b.default.createElement(A.FormattedMessage,{id:"create_team.display_name.next",defaultMessage:"Next"}),b.default.createElement("i",{className:"fa fa-chevron-right"}))))}}]),t}(b.default.Component);t.default=F,F.propTypes={state:v.default.object,updateParent:v.default.func}}});
//# sourceMappingURL=52.9b79fa9434918fc48655.js.map