Merge branch 'add-help-text-to-username-registration' into 'develop'
Add hints to username field during registration See merge request soapbox-pub/soapbox!1832
This commit is contained in:
commit
905eb01308
|
@ -20,6 +20,10 @@ const messages = defineMessages({
|
||||||
id: 'registrations.success',
|
id: 'registrations.success',
|
||||||
defaultMessage: 'Welcome to {siteTitle}!',
|
defaultMessage: 'Welcome to {siteTitle}!',
|
||||||
},
|
},
|
||||||
|
usernameHint: {
|
||||||
|
id: 'registrations.username.hint',
|
||||||
|
defaultMessage: 'May only contain A-Z, 0-9, and underscores',
|
||||||
|
},
|
||||||
usernameTaken: {
|
usernameTaken: {
|
||||||
id: 'registrations.unprocessable_entity',
|
id: 'registrations.unprocessable_entity',
|
||||||
defaultMessage: 'This username has already been taken.',
|
defaultMessage: 'This username has already been taken.',
|
||||||
|
@ -104,7 +108,7 @@ const Registration = () => {
|
||||||
|
|
||||||
<div className='sm:pt-10 sm:w-2/3 md:w-1/2 mx-auto space-y-4'>
|
<div className='sm:pt-10 sm:w-2/3 md:w-1/2 mx-auto space-y-4'>
|
||||||
<Form onSubmit={handleSubmit}>
|
<Form onSubmit={handleSubmit}>
|
||||||
<FormGroup labelText='Your username'>
|
<FormGroup labelText='Your username' hintText={messages.usernameHint}>
|
||||||
<Input
|
<Input
|
||||||
name='username'
|
name='username'
|
||||||
type='text'
|
type='text'
|
||||||
|
@ -112,6 +116,7 @@ const Registration = () => {
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
required
|
required
|
||||||
icon={require('@tabler/icons/at.svg')}
|
icon={require('@tabler/icons/at.svg')}
|
||||||
|
placeholder='LibertyForAll'
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue