From 845503e532205729a04792648c3d23b059618c8c Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 2 Sep 2015 08:17:08 -0400 Subject: Reformatted team_signup_allowed_domains_page.jsx to meet style guide requirements. --- .../team_signup_allowed_domains_page.jsx | 87 ++++++++++++++++------ 1 file changed, 64 insertions(+), 23 deletions(-) (limited to 'web/react') diff --git a/web/react/components/team_signup_allowed_domains_page.jsx b/web/react/components/team_signup_allowed_domains_page.jsx index 90c7ff668..c5d3bc221 100644 --- a/web/react/components/team_signup_allowed_domains_page.jsx +++ b/web/react/components/team_signup_allowed_domains_page.jsx @@ -1,20 +1,20 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. -var client = require('../utils/client.jsx'); +var Client = require('../utils/client.jsx'); -module.exports = React.createClass({ - displayName: 'TeamSignupAllowedDomainsPage', - propTypes: { - state: React.PropTypes.object, - updateParent: React.PropTypes.func - }, - submitBack: function(e) { +export default class TeamSignupAllowedDomainsPage extends React.Component { + constructor(props) { + super(props); + + this.state = {}; + } + submitBack(e) { e.preventDefault(); this.props.state.wizard = 'team_url'; this.props.updateParent(this.props.state); - }, - submitNext: function(e) { + } + submitNext(e) { e.preventDefault(); if (this.refs.open_network.getDOMNode().checked) { @@ -46,12 +46,9 @@ module.exports = React.createClass({ this.props.state.team.type = 'I'; this.props.updateParent(this.props.state); } - }, - getInitialState: function() { - return {}; - }, - render: function() { - client.track('signup', 'signup_team_04_allow_domains'); + } + render() { + Client.track('signup', 'signup_team_04_allow_domains'); var nameError = null; var nameDivClass = 'form-group'; @@ -63,11 +60,21 @@ module.exports = React.createClass({ return (
- +

Email Domain

- +

{'Check this box to allow your ' + strings.Team + ' members to sign up using their ' + strings.Company + ' email addresses if you share the same domain--otherwise, you need to invite everyone yourself.'}

@@ -77,7 +84,16 @@ module.exports = React.createClass({
@ - +
@@ -86,13 +102,38 @@ module.exports = React.createClass({

To allow signups from multiple domains, separate each with a comma.

- +

-   - +   + ); } -}); +} + +TeamSignupAllowedDomainsPage.defaultProps = { + state: {} +}; +TeamSignupAllowedDomainsPage.propTypes = { + state: React.PropTypes.object, + updateParent: React.PropTypes.func +}; -- cgit v1.2.3-1-g7c22