import { translate } from '../../../helpers/l10n';
import { TokenType, UserToken } from '../../../types/token';
import { LoggedInUser } from '../../../types/users';
+import DocumentationTooltip from '../../common/DocumentationTooltip';
import AlertErrorIcon from '../../icons/AlertErrorIcon';
import Step from '../components/Step';
import { getUniqueTokenName } from '../utils';
)}
{this.state.selection === 'generate' && (
<div className="big-spacer-top">
- <form onSubmit={this.handleTokenGenerate}>
- <input
- autoFocus={true}
- className="input-super-large spacer-right text-middle"
- onChange={this.handleTokenNameChange}
- placeholder={translate('onboarding.token.generate_project_token.placeholder')}
- required={true}
- type="text"
- value={this.state.tokenName || ''}
- />
- {this.state.loading ? (
- <i className="spinner text-middle" />
- ) : (
- <SubmitButton className="text-middle" disabled={!this.state.tokenName}>
- {translate('onboarding.token.generate')}
- </SubmitButton>
- )}
+ <form className="display-flex-column" onSubmit={this.handleTokenGenerate}>
+ <label className="h3" htmlFor="generate-token-input">
+ {translate('onboarding.token.generate_project_token.label')}
+ <DocumentationTooltip
+ className="spacer-left"
+ content={translate('onboarding.token.generate_project_token.help')}
+ links={[
+ {
+ href: '/documentation/user-guide/user-token/',
+ label: translate('learn_more')
+ }
+ ]}
+ />
+ </label>
+ <div>
+ <input
+ id="generate-token-input"
+ autoFocus={true}
+ className="input-super-large spacer-right spacer-top text-middle"
+ onChange={this.handleTokenNameChange}
+ required={true}
+ type="text"
+ value={this.state.tokenName || ''}
+ />
+ {this.state.loading ? (
+ <i className="spinner text-middle" />
+ ) : (
+ <SubmitButton className="text-middle spacer-top" disabled={!this.state.tokenName}>
+ {translate('onboarding.token.generate')}
+ </SubmitButton>
+ )}
+ </div>
</form>
</div>
)}
{translate('onboarding.token.use_existing_token')}
</Radio>
{this.state.selection === 'use-existing' && (
- <div className="big-spacer-top">
+ <div className="big-spacer-top display-flex-column">
+ <label className="h3" htmlFor="existing-token-input">
+ {translate('onboarding.token.use_existing_token.label')}
+ <DocumentationTooltip
+ className="spacer-left"
+ content={translate('onboarding.token.use_existing_token.help')}
+ links={[
+ {
+ href: '/documentation/user-guide/user-token/',
+ label: translate('learn_more')
+ }
+ ]}
+ />
+ </label>
<input
+ id="existing-token-input"
autoFocus={true}
- className="input-super-large spacer-right text-middle"
+ className="input-super-large spacer-right spacer-top text-middle"
onChange={this.handleExisingTokenChange}
- placeholder={translate('onboarding.token.use_existing_token.placeholder')}
required={true}
type="text"
value={this.state.existingToken}
className="big-spacer-top"
>
<form
+ className="display-flex-column"
onSubmit={[Function]}
>
- <input
- autoFocus={true}
- className="input-super-large spacer-right text-middle"
- onChange={[Function]}
- placeholder="onboarding.token.generate_project_token.placeholder"
- required={true}
- type="text"
- value=""
- />
- <SubmitButton
- className="text-middle"
- disabled={true}
+ <label
+ className="h3"
+ htmlFor="generate-token-input"
>
- onboarding.token.generate
- </SubmitButton>
+ onboarding.token.generate_project_token.label
+ <DocumentationTooltip
+ className="spacer-left"
+ content="onboarding.token.generate_project_token.help"
+ links={
+ Array [
+ Object {
+ "href": "/documentation/user-guide/user-token/",
+ "label": "learn_more",
+ },
+ ]
+ }
+ />
+ </label>
+ <div>
+ <input
+ autoFocus={true}
+ className="input-super-large spacer-right spacer-top text-middle"
+ id="generate-token-input"
+ onChange={[Function]}
+ required={true}
+ type="text"
+ value=""
+ />
+ <SubmitButton
+ className="text-middle spacer-top"
+ disabled={true}
+ >
+ onboarding.token.generate
+ </SubmitButton>
+ </div>
</form>
</div>
</div>
className="big-spacer-top"
>
<form
+ className="display-flex-column"
onSubmit={[Function]}
>
- <input
- autoFocus={true}
- className="input-super-large spacer-right text-middle"
- onChange={[Function]}
- placeholder="onboarding.token.generate_project_token.placeholder"
- required={true}
- type="text"
- value="my token"
- />
- <i
- className="spinner text-middle"
- />
+ <label
+ className="h3"
+ htmlFor="generate-token-input"
+ >
+ onboarding.token.generate_project_token.label
+ <DocumentationTooltip
+ className="spacer-left"
+ content="onboarding.token.generate_project_token.help"
+ links={
+ Array [
+ Object {
+ "href": "/documentation/user-guide/user-token/",
+ "label": "learn_more",
+ },
+ ]
+ }
+ />
+ </label>
+ <div>
+ <input
+ autoFocus={true}
+ className="input-super-large spacer-right spacer-top text-middle"
+ id="generate-token-input"
+ onChange={[Function]}
+ required={true}
+ type="text"
+ value="my token"
+ />
+ <i
+ className="spinner text-middle"
+ />
+ </div>
</form>
</div>
</div>
className="big-spacer-top"
>
<form
+ className="display-flex-column"
onSubmit={[Function]}
>
- <input
- autoFocus={true}
- className="input-super-large spacer-right text-middle"
- onChange={[Function]}
- placeholder="onboarding.token.generate_project_token.placeholder"
- required={true}
- type="text"
- value=""
- />
- <SubmitButton
- className="text-middle"
- disabled={true}
+ <label
+ className="h3"
+ htmlFor="generate-token-input"
>
- onboarding.token.generate
- </SubmitButton>
+ onboarding.token.generate_project_token.label
+ <DocumentationTooltip
+ className="spacer-left"
+ content="onboarding.token.generate_project_token.help"
+ links={
+ Array [
+ Object {
+ "href": "/documentation/user-guide/user-token/",
+ "label": "learn_more",
+ },
+ ]
+ }
+ />
+ </label>
+ <div>
+ <input
+ autoFocus={true}
+ className="input-super-large spacer-right spacer-top text-middle"
+ id="generate-token-input"
+ onChange={[Function]}
+ required={true}
+ type="text"
+ value=""
+ />
+ <SubmitButton
+ className="text-middle spacer-top"
+ disabled={true}
+ >
+ onboarding.token.generate
+ </SubmitButton>
+ </div>
</form>
</div>
</div>
onboarding.token.generate=Generate
onboarding.token.placeholder=Enter a name for your token
onboarding.token.generate_token=Generate a token
-onboarding.token.generate_token.placeholder=Enter a name for your token
onboarding.token.generate_project_token=Generate a project token
-onboarding.token.generate_project_token.placeholder=Enter a name for your project token
+onboarding.token.generate_project_token.label=Token name
onboarding.token.use_existing_token=Use existing token
-onboarding.token.use_existing_token.placeholder=Enter your existing token
onboarding.token.use_existing_token.label=Existing token value
onboarding.token.invalid_format=The token you have entered has invalid format.
+onboarding.token.use_existing_token.help=Paste an existing token value into the input field.
+onboarding.token.generate_project_token.help=Enter a name for your project token
onboarding.tutorial.env_variables=In the {field} field, enter {value} {extra}
onboarding.tutorial.env_variables.field=Value