context = window
rest = context.JK.Rest()
@JamClassStudentLandingPage = React.createClass({
render: () ->
loggedIn = context.JK.currentUserId?
if this.state.done
ctaButtonText = 'sending you in...'
else if this.state.processing
ctaButtonText = 'hold on...'
else
if loggedIn
ctaButtonText = 'TRY TESTDRIVE'
else
ctaButtonText = 'SIGN UP'
if loggedIn
register = ``
else
if this.state.loginErrors?
for key, value of this.state.loginErrors
break
errorText = context.JK.getFullFirstError(key, this.state.loginErrors,
{email: 'Email', password: 'Password', 'terms_of_service': 'The terms of service'})
register = `
{errorText}
`
if @props.package?
ctaBoxContents = `
Sign up for this amazing TestDrive offer now!
When you sign up below, we will ask you to pay for your TestDrive package, and then we'll forward
your lesson requests to these teachers for scheduling.
We'll give you 1:1 help to get set up and ready to go with our free app.
`
else
ctaBoxContents = `
Sign up now. You have no obligation to buy anything. Signing up makes you eligible for our TestDrive
offers.
After signing up, you can search our community of world-class instructors. If you book a TestDrive lesson
you can choose to TestDrive 4, 2, or 1 teachers at that time.