mirror of https://github.com/embarklabs/embark.git
fix(cockpit): disable autocomplete in Login component
This commit is contained in:
parent
c25c644b5a
commit
3ddcd1f825
|
@ -4,12 +4,12 @@ import logo from '../images/logo-new.svg';
|
||||||
import './Login.css';
|
import './Login.css';
|
||||||
|
|
||||||
class Login extends React.Component {
|
class Login extends React.Component {
|
||||||
constructor(props){
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = props.credentials;
|
this.state = props.credentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChange(event){
|
handleChange(event) {
|
||||||
this.setState({[event.target.name]: event.target.value});
|
this.setState({[event.target.name]: event.target.value});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,27 +28,30 @@ class Login extends React.Component {
|
||||||
<p className="text-danger">{this.props.error}</p>
|
<p className="text-danger">{this.props.error}</p>
|
||||||
}
|
}
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<form onSubmit={(e) => this.handleSubmit(e)}>
|
<form onSubmit={(e) => this.handleSubmit(e)}>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label htmlFor="host">Host</label>
|
<label htmlFor="host">Host</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
className="form-control form-control-lg"
|
className="form-control form-control-lg"
|
||||||
id="host"
|
id="host"
|
||||||
name="host"
|
name="host"
|
||||||
placeholder="Enter Embark host"
|
placeholder="Enter Embark host"
|
||||||
onChange={(e) => this.handleChange(e)}
|
onChange={(e) => this.handleChange(e)}
|
||||||
value={this.state.host}/>
|
value={this.state.host}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label htmlFor="token">Token</label>
|
<label htmlFor="token">Token</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
className="form-control form-control-lg"
|
className="form-control form-control-lg"
|
||||||
id="token"
|
id="token"
|
||||||
name="token"
|
name="token"
|
||||||
placeholder="Enter token"
|
placeholder="Enter token"
|
||||||
onChange={(e) => this.handleChange(e)}
|
onChange={(e) => this.handleChange(e)}
|
||||||
value={this.state.token}/>
|
autoComplete="off"
|
||||||
<small className="form-text text-muted">Execute <code>embark run</code> in the command line to get your token.</small>
|
value={this.state.token}/>
|
||||||
|
<small className="form-text text-muted">Execute <code>embark run</code> in the command line to get
|
||||||
|
your token.
|
||||||
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" className="btn btn-pill btn-dark">Enter Cockpit</button>
|
<button type="submit" className="btn btn-pill btn-dark">Enter Cockpit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue