Merge pull request #935 from mewtaylor/issue/gh-933

Fix GH-933: Put label for “Not Required” above input
This commit is contained in:
Matthew Taylor 2016-10-02 11:46:02 -04:00 committed by GitHub
commit 5c3cba2a89
2 changed files with 15 additions and 3 deletions

View file

@ -20,3 +20,8 @@
}
}
}
.row-label {
margin-bottom: .75rem;
line-height: 1.7rem;
}

View file

@ -741,8 +741,15 @@ module.exports = {
required /> :
[]
}
<Input label={formatMessage({id: 'teacherRegistration.zipCode'})}
type="text"
<b className="row-label">
<intl.FormattedMessage id="teacherRegistration.zipCode" />
</b>
{this.state.countryChoice !== 'us' ?
<p className="help-text">
<intl.FormattedMessage id="teacherRegistration.notRequired" />
</p> : []
}
<Input type="text"
name="address.zip"
validations={{
maxLength: 10
@ -752,7 +759,7 @@ module.exports = {
id: 'registration.validationMaxLength'
})
}}
required={(this.state.countryChoice === 'us')} />
required={(this.state.countryChoice === 'us') ? true : 'isFalse'} />
<GeneralError name="all" />
<NextStepButton waiting={this.props.waiting || this.state.waiting}
text={<intl.FormattedMessage id="registration.nextStep" />} />