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
);
return (
<Formsy.Form {... this.props} className={classes}>
<GeneralError name="all" />
{this.props.children}
</Formsy.Form>
<Formsy.Form {... this.props} className={classes}>
<GeneralError name="all" />
{this.props.children}
</Formsy.Form>
);
}
});

View file

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