Explain when people need to sign up for Spaceport
This commit is contained in:
@@ -40,11 +40,6 @@ export function LoginForm(props) {
|
||||
>
|
||||
<Header size='medium'>Log In to Spaceport</Header>
|
||||
|
||||
<Message warning>
|
||||
<Message.Header>First time at the new portal?</Message.Header>
|
||||
<p>Sign up below from Protospace Wi-Fi / computers.</p>
|
||||
</Message>
|
||||
|
||||
<Form.Input
|
||||
label='Username'
|
||||
name='username'
|
||||
@@ -109,6 +104,11 @@ export function SignupForm(props) {
|
||||
const interval = setInterval(getStatus, 500);
|
||||
|
||||
const data = { ...input, email: input.email.toLowerCase(), bypass_code: bypass_code, request_id: request_id };
|
||||
|
||||
if (bypass_code) {
|
||||
data.existing_member = true;
|
||||
}
|
||||
|
||||
requester('/registration/', 'POST', '', data)
|
||||
.then(res => {
|
||||
clearInterval(interval);
|
||||
@@ -161,7 +161,7 @@ export function SignupForm(props) {
|
||||
error={error.email}
|
||||
/>
|
||||
|
||||
<Form.Group grouped>
|
||||
{!!bypass_code || <Form.Group grouped>
|
||||
<Form.Radio
|
||||
label='I have an account on the old portal'
|
||||
name='existing_member'
|
||||
@@ -178,7 +178,7 @@ export function SignupForm(props) {
|
||||
onChange={handleValues}
|
||||
error={!!error.existing_member}
|
||||
/>
|
||||
</Form.Group>
|
||||
</Form.Group>}
|
||||
|
||||
<Form.Input
|
||||
label='Password'
|
||||
|
@@ -37,7 +37,7 @@ function ResetForm() {
|
||||
});
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit} error={error.email == 'Not found.'}>
|
||||
<Form onSubmit={handleSubmit} error={!!error.email}>
|
||||
<Form.Input
|
||||
label='Email'
|
||||
name='email'
|
||||
@@ -45,11 +45,28 @@ function ResetForm() {
|
||||
error={error.email}
|
||||
/>
|
||||
|
||||
<Message
|
||||
error
|
||||
header='Email not found in Spaceport'
|
||||
content='Ask a director if you forgot which one you used.'
|
||||
/>
|
||||
{error.email == 'Not found.' &&
|
||||
<Message
|
||||
error
|
||||
header='Email not found in Spaceport'
|
||||
content='Ask a director if you forgot which one you used.'
|
||||
/>
|
||||
}
|
||||
|
||||
{error.email == 'Not on Spaceport.' &&
|
||||
<Message
|
||||
error
|
||||
header={'You haven\'t registered to Spaceport yet'}
|
||||
content={
|
||||
<>
|
||||
Please sign up to the new portal here:<br />
|
||||
<Link to='/#outside-protospace-15c7b5'>
|
||||
Spaceport Registration
|
||||
</Link>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
||||
<Form.Button loading={loading} error={error.non_field_errors}>
|
||||
Submit
|
||||
|
Reference in New Issue
Block a user