Login component working
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { regExpPattern } from 'regexp-pattern'
|
||||
import { api } from '../helpers'
|
||||
import { api } from 'src/API'
|
||||
import { WaitModal, MessageModal } from '../Modal'
|
||||
import { Image, Link, Text, Row, Column, BoundInput, BoundCheckbox, BoundButton } from 'ui'
|
||||
import headerLogo from 'images/deighton.png'
|
||||
@@ -54,7 +54,7 @@ export class Login extends React.Component {
|
||||
return
|
||||
}
|
||||
|
||||
let obj = this.state.binder.getValues()
|
||||
let obj = this.state.binder.getModifiedFieldValues()
|
||||
|
||||
if (obj) {
|
||||
this.setState({ waitModal: true })
|
||||
@@ -75,7 +75,7 @@ export class Login extends React.Component {
|
||||
elems[0].focus()
|
||||
}
|
||||
this.setState({
|
||||
binder: new FormBinder({ email: this.state.binder.getField('email').value }, Login.bindings),
|
||||
binder: new FormBinder({ email: this.state.binder.getFieldValue('email').value }, Login.bindings),
|
||||
waitModal: false,
|
||||
messageModal: { title: 'Login Error...', message: `Unable to login. ${error.message}` }
|
||||
})
|
||||
@@ -119,23 +119,22 @@ export class Login extends React.Component {
|
||||
</Row.Item>
|
||||
<Row.Item grow />
|
||||
<Row.Item>
|
||||
<BoundCheckbox label='Remember Me'
|
||||
name='rememberMe' onChange={this.handleChange} binder={this.state.binder} />
|
||||
<BoundCheckbox label='Remember Me' name='rememberMe' binder={this.state.binder} />
|
||||
</Row.Item>
|
||||
</Row>
|
||||
</Column.Item>
|
||||
<Column.Item>
|
||||
<Column.Item height={20} />
|
||||
<Column.Item height={40}>
|
||||
<Row>
|
||||
<Row.Item grow />
|
||||
<Row.Item>
|
||||
<br />
|
||||
<BoundButton name='submit' content='Login' height={60} submit binder={this.state.binder} />
|
||||
<BoundButton name='submit' width={100} content='Login' submit binder={this.state.binder} />
|
||||
</Row.Item>
|
||||
</Row>
|
||||
</Column.Item>
|
||||
<Column.Item height={20} />
|
||||
<Column.Item>
|
||||
<Text>
|
||||
<br />
|
||||
Please contact <Link to={`mailto:${versionInfo.supportEmail}`}>{versionInfo.supportEmail}</Link> to request login credentials.
|
||||
</Text>
|
||||
</Column.Item>
|
||||
|
||||
Reference in New Issue
Block a user