some code formatting tweaks

This commit is contained in:
Matthew Taylor 2016-06-23 15:10:51 -04:00
parent 10f154ca10
commit 86a8f94919
2 changed files with 8 additions and 16 deletions

View file

@ -20,10 +20,10 @@ var Form = React.createClass({
this.props.className this.props.className
); );
return ( return (
<Formsy.Form {... this.props} className={classes}> <Formsy.Form {... this.props} className={classes}>
<GeneralError name="all" /> <GeneralError name="all" />
{this.props.children} {this.props.children}
</Formsy.Form> </Formsy.Form>
); );
} }
}); });

View file

@ -37,15 +37,11 @@ var Login = React.createClass({
<div className="login"> <div className="login">
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
<label htmlFor="username" key="usernameLabel"> <label htmlFor="username" key="usernameLabel">
<FormattedMessage <FormattedMessage id='general.username' />
id='general.username'
defaultMessage={'Username'} />
</label> </label>
<Input type="text" ref="username" name="username" maxLength="30" key="usernameInput" required /> <Input type="text" ref="username" name="username" maxLength="30" key="usernameInput" required />
<label htmlFor="password" key="passwordLabel"> <label htmlFor="password" key="passwordLabel">
<FormattedMessage <FormattedMessage id='general.password' />
id='general.password'
defaultMessage={'Password'} />
</label> </label>
<Input type="password" ref="password" name="password" key="passwordInput" required /> <Input type="password" ref="password" name="password" key="passwordInput" required />
{this.state.waiting ? [ {this.state.waiting ? [
@ -54,15 +50,11 @@ var Login = React.createClass({
</Button> </Button>
] : [ ] : [
<Button className="submit-button white" type="submit" key="submitButton"> <Button className="submit-button white" type="submit" key="submitButton">
<FormattedMessage <FormattedMessage id='general.signIn' />
id='general.signIn'
defaultMessage={'Sign in'} />
</Button> </Button>
]} ]}
<a className="right" href="/accounts/password_reset/" key="passwordResetLink"> <a className="right" href="/accounts/password_reset/" key="passwordResetLink">
<FormattedMessage <FormattedMessage id='login.forgotPassword' />
id='login.forgotPassword'
defaultMessage={'Forgot Password?'} />
</a> </a>
{error} {error}
</Form> </Form>