From 91fa6c8da1cbf6647791fa43699eb310f990e7e9 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 27 Jul 2015 13:21:50 -0700 Subject: Removed usage of window.location.origin throughout the codebase --- web/react/components/signup_team_complete.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/components/signup_team_complete.jsx') diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 3e8a57308..11882c57f 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -248,7 +248,7 @@ TeamURLPage = React.createClass({
- { window.location.origin + "/" } + { utils.getWindowLocationOrigin() + "/" }
@@ -566,7 +566,7 @@ PasswordPage = React.createClass({ props.state.wizard = "finished"; props.updateParent(props.state, true); - window.location.href = window.location.origin + '/' + props.state.team.name + '/login?email=' + encodeURIComponent(teamSignup.team.email); + window.location.href = utils.getWindowLocationOrigin() + '/' + props.state.team.name + '/login?email=' + encodeURIComponent(teamSignup.team.email); // client.loginByEmail(teamSignup.team.domain, teamSignup.team.email, teamSignup.user.password, // function(data) { -- cgit v1.2.3-1-g7c22 From 120ca016626bcb3e95090280b7a1d02c6588b6a8 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 28 Jul 2015 01:08:03 +0500 Subject: Signup Ui changes --- web/react/components/signup_team_complete.jsx | 109 ++++++++++++++++---------- 1 file changed, 69 insertions(+), 40 deletions(-) (limited to 'web/react/components/signup_team_complete.jsx') diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 3e8a57308..ee85342ce 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -80,19 +80,25 @@ WelcomePage = React.createClass({

-

Welcome!

-

{"Let's set up your " + strings.Team + " on " + config.SiteName + "."}

+

Welcome to:

+

{config.SiteName}

+

Let's setup your new team

Please confirm your email address:
- { this.props.state.team.email }
+

+
{ this.props.state.team.email }
+
+

+

+ Your account will administer the new team site.
+ You can add other administrators later.

{ storage_error }

-

If this is not correct, you can switch to a different email. We'll send you a new invite right away.

@@ -105,7 +111,7 @@ WelcomePage = React.createClass({ { server_error }
- + Use a different email
); } @@ -158,9 +164,11 @@ TeamDisplayNamePage = React.createClass({
{ name_error }
-

{"Your " + strings.Team + " name shows in menus and headings. It may include the name of your " + strings.Company + ", but it's not required."}

-   - +
{"Name your " + strings.Team + " in any language. Your " + strings.Team + " name shows in menus and headings."}
+ +
+ Back to previous step +
); @@ -255,10 +263,16 @@ TeamURLPage = React.createClass({ { name_error } -

{"Pick something short and memorable for your " + strings.Team + "'s web address."}

-

{"Your " + strings.Team + " URL can only contain lowercase letters, numbers and dashes. Also, it needs to start with a letter and cannot end in a dash."}

-   - +

{"Choose the web address of your new " + strings.Team + ":"}

+ + +
+ Back to previous step +
); @@ -461,14 +475,16 @@ SendInivtesPage = React.createClass({ return (
- -

Send Invitations

- { emails } -
-
 
-
-

{"If you'd prefer, you can send invitations after you finish setting up the "+ strings.Team + "."}

-
Skip this step
+ +

Invite Team Members

+ { emails } +
Add Invitation
+
+ +

if you prefer, you can invite team members later
and skip this step for now.

+
+ Back to previous step +
); } @@ -512,19 +528,24 @@ UsernamePage = React.createClass({
-

Choose a username

-
-
-
- +

Your username

+
Select a memorable username that makes it easy for teammates to identify you:
+
+
+
+
+
Choose your username
+ +
Usernames must begin with a letter and contain 3 to 15 characters made up of lowercase letters, numbers, and the symbols '.', '-' and '_'
+
+
+ { name_error }
- { name_error } + + -

{"Pick something " + strings.Team + "mates will recognize. Your username is how you will appear to others."}

-

It can be made of lowercase letters and numbers.

-   -
); @@ -600,24 +621,32 @@ PasswordPage = React.createClass({
-

Choose a password

-

You'll use your email address ({this.props.state.team.email}) and password to log into {config.SiteName}.

-
-
-
- +

Your password

+
Select a password that you'll use to login with your email address:
+
+
Email
+
{this.props.state.team.email}
+
+
+
+
Choose your password
+ +
Passwords must contain 5 to 50 characters. Your password will be strongest if it contains a mix of symbols, numbers, and upper and lowercase characters.
+
+
+ { name_error }
-
- { name_error }
-   - +

By proceeding to create your account and use { config.SiteName }, you agree to our Terms of Service and Privacy Policy. If you do not agree, you cannot use {config.SiteName}.

+
); -- cgit v1.2.3-1-g7c22 From ff362b77929cbb65f941e14144472f7d6ca9d430 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Tue, 28 Jul 2015 11:36:33 -0400 Subject: updates to sign-up flow, remove company name and marketing checkbox --- web/react/components/signup_team_complete.jsx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'web/react/components/signup_team_complete.jsx') diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index ee85342ce..450a95dd0 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -134,6 +134,7 @@ TeamDisplayNamePage = React.createClass({ this.props.state.wizard = "team_url"; this.props.state.team.display_name = display_name; + this.props.state.team.name = utils.cleanUpUrlable(display_name); this.props.updateParent(this.props.state); }, getInitialState: function() { @@ -563,15 +564,15 @@ PasswordPage = React.createClass({ var password = this.refs.password.getDOMNode().value.trim(); if (!password || password.length < 5) { - this.setState({name_error: "Please enter at least 5 characters"}); + this.setState({password_error: "Please enter at least 5 characters"}); return; } - this.setState({name_error: ""}); + this.setState({password_error: null, server_error: null}); $('#finish-button').button('loading'); var teamSignup = JSON.parse(JSON.stringify(this.props.state)); teamSignup.user.password = password; - teamSignup.user.allow_marketing = this.refs.email_service.getDOMNode().checked; + teamSignup.user.allow_marketing = true; delete teamSignup.wizard; var ctl = this; @@ -603,7 +604,7 @@ PasswordPage = React.createClass({ }, 5000); }.bind(this), function(err) { - this.setState({name_error: err.message}); + this.setState({server_error: err.message}); $('#sign-up-button').button('reset'); }.bind(this) ); @@ -615,7 +616,8 @@ PasswordPage = React.createClass({ client.track('signup', 'signup_team_07_password'); - var name_error = this.state.name_error ? : null; + var password_error = this.state.password_error ? : null; + var server_error = this.state.server_error ? : null; return (
@@ -626,7 +628,7 @@ PasswordPage = React.createClass({
Email
{this.props.state.team.email}
-
+
Choose your password
@@ -634,12 +636,10 @@ PasswordPage = React.createClass({
Passwords must contain 5 to 50 characters. Your password will be strongest if it contains a mix of symbols, numbers, and upper and lowercase characters.
- { name_error } + { password_error } + { server_error }
-
- -
@@ -669,9 +669,6 @@ module.exports = React.createClass({ props.wizard = "welcome"; props.team = {}; props.team.email = this.props.email; - props.team.display_name = this.props.name; - props.team.company_name = this.props.name; - props.team.name = utils.cleanUpUrlable(this.props.name); props.team.allowed_domains = ""; props.invites = []; props.invites.push(""); -- cgit v1.2.3-1-g7c22 From 95123302419c2ea73e239ef5a62d1a0148d801dc Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Tue, 28 Jul 2015 11:49:45 -0400 Subject: updated changing email in sign up flow to work properly --- web/react/components/signup_team_complete.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'web/react/components/signup_team_complete.jsx') diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 450a95dd0..559009f44 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -42,11 +42,15 @@ WelcomePage = React.createClass({ state.email_error = ""; } - client.signupTeam(email, this.props.state.team.name, + client.signupTeam(email, function(data) { - this.props.state.wizard = "finished"; - this.props.updateParent(this.props.state); - window.location.href = "/signup_team_confirm/?email=" + encodeURI(email); + if (data["follow_link"]) { + window.location.href = data["follow_link"]; + } else { + this.props.state.wizard = "finished"; + this.props.updateParent(this.props.state); + window.location.href = "/signup_team_confirm/?email=" + encodeURIComponent(team.email); + } }.bind(this), function(err) { this.state.server_error = err.message; -- cgit v1.2.3-1-g7c22 From f084188010ccc0b82f17b99e5cacde74e732c318 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 29 Jul 2015 07:52:11 -0400 Subject: added use of strings.Team to replace hardcoded mentions of 'team' --- web/react/components/signup_team_complete.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/react/components/signup_team_complete.jsx') diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 559009f44..ebb40f17f 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -481,12 +481,12 @@ SendInivtesPage = React.createClass({
-

Invite Team Members

+

{"Invite " + utils.toTitleCase(strings.Team) + " Members"}

{ emails }
-

if you prefer, you can invite team members later
and skip this step for now.

+

{"if you prefer, you can invite " + strings.Team + " members later"}
and skip this step for now.

@@ -534,7 +534,7 @@ UsernamePage = React.createClass({

Your username

-
Select a memorable username that makes it easy for teammates to identify you:
+
{"Select a memorable username that makes it easy for " + strings.Team + "mates to identify you:"}
-- cgit v1.2.3-1-g7c22