| | |
| | | isDisabled: PropTypes.bool, |
| | | changelang: PropTypes.func, |
| | | handleSubmit: PropTypes.func, |
| | | loaded: PropTypes.func, |
| | | dict: PropTypes.object, |
| | | auth: PropTypes.bool, |
| | | lang: PropTypes.string, |
| | |
| | | }) |
| | | return |
| | | } |
| | | this.props.handleSubmit() |
| | | |
| | | if (!this.props.form.getFieldValue('username')) { |
| | | const input = document.getElementById('username') |
| | | if (input) { |
| | | input.focus() |
| | | } |
| | | } else if (!this.props.form.getFieldValue('password')) { |
| | | const input = document.getElementById('password') |
| | | if (input) { |
| | | input.focus() |
| | | } |
| | | } else { |
| | | this.props.handleSubmit() |
| | | } |
| | | } |
| | | |
| | | componentDidMount () { |
| | |
| | | input.focus() |
| | | } |
| | | } |
| | | this.props.loaded() |
| | | } |
| | | |
| | | render() { |