on master help sign in
fix form submission with enter
ebe4c9fLiam Fitzgerald
src/form/BridgeForm.js+2−2
@@ -36,11 +36,11 @@ export default function BridgeForm({
36 return (
36 return (
37 <Form mutators={{ ...arrayMutators }} onSubmit={_onSubmit} {...rest}>
37 <Form mutators={{ ...arrayMutators }} onSubmit={_onSubmit} {...rest}>
38 {formProps => (
38 {formProps => (
39− <>
39+ <form style={{ display: 'contents' }} onSubmit={formProps.handleSubmit}>
40 <ValidationPauser />
40 <ValidationPauser />
41 {children(formProps)}
41 {children(formProps)}
42 {onValues && <ValuesHandler {...formProps} onValues={onValues} />}
42 {onValues && <ValuesHandler {...formProps} onValues={onValues} />}
43− </>
43+ </form>
44 )}
44 )}
45 </Form>
45 </Form>
46 );
46 );
src/form/SubmitButton.js+1
@@ -56,6 +56,7 @@ export default function SubmitButton({
56
56
57 return (
57 return (
58 <As
58 <As
59+ type="submit"
59 className={cn('mt4', className)}
60 className={cn('mt4', className)}
60 disabled={!canSubmit}
61 disabled={!canSubmit}
61 accessory={blinkIf(validating || submitting)}
62 accessory={blinkIf(validating || submitting)}
src/indigo-react/components/Button.js+2
@@ -17,6 +17,7 @@ export default function Button({
17 accessory = '→',
17 accessory = '→',
18 onClick,
18 onClick,
19 background,
19 background,
20+ type,
20 children,
21 children,
21 ...rest
22 ...rest
22}) {
23}) {
@@ -61,6 +62,7 @@ export default function Button({
61 {background}
62 {background}
62 <Grid.Item full as={Flex} justify="between" className="z2">
63 <Grid.Item full as={Flex} justify="between" className="z2">
63 <span>{children}</span>
64 <span>{children}</span>
65+ {type && <button type={type} style={{ display: 'none' }}></button>}
64 <div className={cn('pl4')}>{accessory}</div>
66 <div className={cn('pl4')}>{accessory}</div>
65 </Grid.Item>
67 </Grid.Item>
66 {detail && (
68 {detail && (
src/views/Activate/ActivateCode.js+2−1
@@ -151,7 +151,8 @@ export default function ActivateCode() {
151 Activate
151 Activate
152 </Grid.Item>
152 </Grid.Item>
153 <Grid.Item full as={P} className="mb2">
153 <Grid.Item full as={P} className="mb2">
154− Someone has invited you to claim your Urbit identity and join the network. Enter your activation code to continue.
154+ Someone has invited you to claim your Urbit identity and join the
155+ network. Enter your activation code to continue.
155 </Grid.Item>
156 </Grid.Item>
156 <BridgeForm
157 <BridgeForm
157 validate={validate}
158 validate={validate}
src/views/Activate/PassportDownload.js+9−3
@@ -52,14 +52,20 @@ export default function PassportDownload({ className }) {
52
52
53 return (
53 return (
54 <>
54 <>
55+ <PassportView
56+ className={className}
55− <PassportView className={className} header="Download Your Urbit Passport" step={1}>
57+ header="Download Your Urbit Passport"
58+ step={1}>
56 <Grid>
59 <Grid>
57 <Grid.Item full>
60 <Grid.Item full>
58 <P>
61 <P>
59− Your Passport includes your Master Ticket, a password giving you total control of your Urbit identity. You’ll need it to access the network and manage your identity.
62+ Your Passport includes your Master Ticket, a password giving you
63+ total control of your Urbit identity. You’ll need it to access the
64+ network and manage your identity.
60 </P>
65 </P>
61 <P>
66 <P>
62− After your Passport is downloaded, make sure to print it out on paper and store it somewhere safe.
67+ After your Passport is downloaded, make sure to print it out on
68+ paper and store it somewhere safe.
63 </P>
69 </P>
64 </Grid.Item>
70 </Grid.Item>
65 <Grid.Item
71 <Grid.Item
src/views/Activate/PassportVerify.js+9−3
@@ -47,13 +47,19 @@ export default function PassportVerify({ className }) {
47 );
47 );
48
48
49 return (
49 return (
50+ <PassportView
50− <PassportView header="Verify Your Master Ticket" step={2} className={className}>
51+ header="Verify Your Master Ticket"
52+ step={2}
53+ className={className}>
51 <Grid>
54 <Grid>
52 <Grid.Item full as={P}>
55 <Grid.Item full as={P}>
53− We need to verify that you’re you. Unzip the file you downloaded in the previous step. It should yield a directory of images.
56+ We need to verify that you’re you. Unzip the file you downloaded in
57+ the previous step. It should yield a directory of images.
54 </Grid.Item>
58 </Grid.Item>
55 <Grid.Item full as={P}>
59 <Grid.Item full as={P}>
56− One of the images includes your Master Ticket. It’s a four-word phrase separated with hyphens. Enter it below to verify you recieved it (include the hyphens).
60+ One of the images includes your Master Ticket. It’s a four-word phrase
61+ separated with hyphens. Enter it below to verify you recieved it
62+ (include the hyphens).
57 </Grid.Item>
63 </Grid.Item>
58 <Grid.Item full as={P}>
64 <Grid.Item full as={P}>
59 <b>Never share your Master Ticket with anyone else.</b>
65 <b>Never share your Master Ticket with anyone else.</b>