fix: associate HTML labels with inputs (#9599)
Refs #8879 Co-authored-by: morsko1 <morssko1@gmail.com>
This commit is contained in:
@@ -66,10 +66,17 @@ export default class ApiKeyAuth extends React.Component {
|
||||
<p>In: <code>{ schema.get("in") }</code></p>
|
||||
</Row>
|
||||
<Row>
|
||||
<label>Value:</label>
|
||||
<label htmlFor="api_key_value">Value:</label>
|
||||
{
|
||||
value ? <code> ****** </code>
|
||||
: <Col><Input type="text" onChange={ this.onChange } autoFocus/></Col>
|
||||
: <Col>
|
||||
<Input
|
||||
id="api_key_value"
|
||||
type="text"
|
||||
onChange={ this.onChange }
|
||||
autoFocus
|
||||
/>
|
||||
</Col>
|
||||
}
|
||||
</Row>
|
||||
{
|
||||
|
||||
@@ -65,20 +65,34 @@ export default class BasicAuth extends React.Component {
|
||||
<Markdown source={ schema.get("description") } />
|
||||
</Row>
|
||||
<Row>
|
||||
<label>Username:</label>
|
||||
<label htmlFor="auth_username">Username:</label>
|
||||
{
|
||||
username ? <code> { username } </code>
|
||||
: <Col><Input type="text" required="required" name="username" onChange={ this.onChange } autoFocus/></Col>
|
||||
: <Col>
|
||||
<Input
|
||||
id="auth_username"
|
||||
type="text"
|
||||
required="required"
|
||||
name="username"
|
||||
onChange={ this.onChange }
|
||||
autoFocus
|
||||
/>
|
||||
</Col>
|
||||
}
|
||||
</Row>
|
||||
<Row>
|
||||
<label>Password:</label>
|
||||
<label htmlFor="auth_password">Password:</label>
|
||||
{
|
||||
username ? <code> ****** </code>
|
||||
: <Col><Input autoComplete="new-password"
|
||||
name="password"
|
||||
type="password"
|
||||
onChange={ this.onChange }/></Col>
|
||||
: <Col>
|
||||
<Input
|
||||
id="auth_password"
|
||||
autoComplete="new-password"
|
||||
name="password"
|
||||
type="password"
|
||||
onChange={ this.onChange }
|
||||
/>
|
||||
</Col>
|
||||
}
|
||||
</Row>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user