king
2020-03-12 1dfd49b103e721f9bb63fd4d472b6fcc225d94a1
src/views/login/loginform.jsx
@@ -10,6 +10,7 @@
    isDisabled: PropTypes.bool,
    changelang: PropTypes.func,
    handleSubmit: PropTypes.func,
    loaded: PropTypes.func,
    dict: PropTypes.object,
    auth: PropTypes.bool,
    lang: PropTypes.string,
@@ -51,7 +52,20 @@
      })
      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 () {
@@ -83,6 +97,7 @@
        input.focus()
      }
    }
    this.props.loaded()
  }
  render() {