mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Always enable the login button (#24407)
The login button should always be enabled, to account for password managers that will auto-fill the form fields.
This commit is contained in:
parent
39bd2c8fce
commit
b981546290
2 changed files with 4 additions and 4 deletions
|
@ -57,7 +57,6 @@ exports[`BasicLoginForm renders as expected 1`] = `
|
||||||
data-test-subj="loginSubmit"
|
data-test-subj="loginSubmit"
|
||||||
fill={true}
|
fill={true}
|
||||||
iconSide="left"
|
iconSide="left"
|
||||||
isDisabled={true}
|
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { EuiButton, EuiCallOut, EuiFieldText, EuiFormRow, EuiPanel, EuiSpacer } from '@elastic/eui';
|
import { EuiButton, EuiCallOut, EuiFieldText, EuiFormRow, EuiPanel, EuiSpacer } from '@elastic/eui';
|
||||||
import React, { ChangeEvent, Component, Fragment } from 'react';
|
import React, { ChangeEvent, Component, FormEvent, Fragment, MouseEvent } from 'react';
|
||||||
import { LoginState } from '../../../../../common/login_state';
|
import { LoginState } from '../../../../../common/login_state';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -73,7 +73,6 @@ export class BasicLoginForm extends Component<Props, State> {
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={this.submit}
|
onClick={this.submit}
|
||||||
isLoading={this.state.isLoading}
|
isLoading={this.state.isLoading}
|
||||||
isDisabled={!this.isFormValid()}
|
|
||||||
data-test-subj="loginSubmit"
|
data-test-subj="loginSubmit"
|
||||||
>
|
>
|
||||||
Log in
|
Log in
|
||||||
|
@ -141,7 +140,9 @@ export class BasicLoginForm extends Component<Props, State> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
private submit = () => {
|
private submit = (e: MouseEvent<HTMLButtonElement> | FormEvent<HTMLFormElement>) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
if (!this.isFormValid()) {
|
if (!this.isFormValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue