on master help sign in
fix form submission with enter
commitebe4c9fd69fb75e462ebdb20ddaf5f88c622ef94 authorLiam Fitzgerald <hastuc-dibtux@gmail.com> dateThu 19 Sep 2019, 19:17 (7 years ago) parentf66e693
6 files changed+25−9
src/form/BridgeForm.js+2−2 src/form/SubmitButton.js+1 src/indigo-react/components/Button.js+2 src/views/Activate/ActivateCode.js+2−1 src/views/Activate/PassportDownload.js+9−3 src/views/Activate/PassportVerify.js+9−3
src/form/BridgeForm.js+2−2
@@ -36,11 +36,11 @@ export default function BridgeForm({
3636 return (
3737 <Form mutators={{ ...arrayMutators }} onSubmit={_onSubmit} {...rest}>
3838 {formProps => (
39− <>
39+ <form style={{ display: 'contents' }} onSubmit={formProps.handleSubmit}>
4040 <ValidationPauser />
4141 {children(formProps)}
4242 {onValues && <ValuesHandler {...formProps} onValues={onValues} />}
43− </>
43+ </form>
4444 )}
4545 </Form>
4646 );
src/form/SubmitButton.js+1
@@ -56,6 +56,7 @@ export default function SubmitButton({
5656
5757 return (
5858 <As
59+ type="submit"
5960 className={cn('mt4', className)}
6061 disabled={!canSubmit}
6162 accessory={blinkIf(validating || submitting)}
src/indigo-react/components/Button.js+2
@@ -17,6 +17,7 @@ export default function Button({
1717 accessory = '→',
1818 onClick,
1919 background,
20+ type,
2021 children,
2122 ...rest
2223}) {
@@ -61,6 +62,7 @@ export default function Button({
6162 {background}
6263 <Grid.Item full as={Flex} justify="between" className="z2">
6364 <span>{children}</span>
65+ {type && <button type={type} style={{ display: 'none' }}></button>}
6466 <div className={cn('pl4')}>{accessory}</div>
6567 </Grid.Item>
6668 {detail && (
src/views/Activate/ActivateCode.js+2−1
@@ -151,7 +151,8 @@ export default function ActivateCode() {
151151 Activate
152152 </Grid.Item>
153153 <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.
155156 </Grid.Item>
156157 <BridgeForm
157158 validate={validate}
src/views/Activate/PassportDownload.js+9−3
@@ -52,14 +52,20 @@ export default function PassportDownload({ className }) {
5252
5353 return (
5454 <>
55− <PassportView className={className} header="Download Your Urbit Passport" step={1}>
55+ <PassportView
56+ className={className}
57+ header="Download Your Urbit Passport"
58+ step={1}>
5659 <Grid>
5760 <Grid.Item full>
5861 <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.
6065 </P>
6166 <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.
6369 </P>
6470 </Grid.Item>
6571 <Grid.Item
src/views/Activate/PassportVerify.js+9−3
@@ -47,13 +47,19 @@ export default function PassportVerify({ className }) {
4747 );
4848
4949 return (
50− <PassportView header="Verify Your Master Ticket" step={2} className={className}>
50+ <PassportView
51+ header="Verify Your Master Ticket"
52+ step={2}
53+ className={className}>
5154 <Grid>
5255 <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.
5458 </Grid.Item>
5559 <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).
5763 </Grid.Item>
5864 <Grid.Item full as={P}>
5965 <b>Never share your Master Ticket with anyone else.</b>