SecurityForm: i18n
This commit is contained in:
parent
75a0062dd4
commit
c1f3dbd22d
1 changed files with 10 additions and 5 deletions
|
@ -20,6 +20,11 @@ const messages = defineMessages({
|
||||||
updateEmailFail: { id: 'security.update_email.fail', defaultMessage: 'Update email failed.' },
|
updateEmailFail: { id: 'security.update_email.fail', defaultMessage: 'Update email failed.' },
|
||||||
updatePasswordSuccess: { id: 'security.update_password.success', defaultMessage: 'Password successfully updated.' },
|
updatePasswordSuccess: { id: 'security.update_password.success', defaultMessage: 'Password successfully updated.' },
|
||||||
updatePasswordFail: { id: 'security.update_password.fail', defaultMessage: 'Update password failed.' },
|
updatePasswordFail: { id: 'security.update_password.fail', defaultMessage: 'Update password failed.' },
|
||||||
|
emailFieldLabel: { id: 'security.fields.email.label', defaultMessage: 'Email address' },
|
||||||
|
passwordFieldLabel: { id: 'security.fields.password.label', defaultMessage: 'Password' },
|
||||||
|
oldPasswordFieldLabel: { id: 'security.fields.old_password.label', defaultMessage: 'Current password' },
|
||||||
|
newPasswordFieldLabel: { id: 'security.fields.new_password.label', defaultMessage: 'New password' },
|
||||||
|
confirmationFieldLabel: { id: 'security.fields.password_confirmation.label', defaultMessage: 'New password (again)' },
|
||||||
});
|
});
|
||||||
|
|
||||||
export default @injectIntl
|
export default @injectIntl
|
||||||
|
@ -81,7 +86,7 @@ class ChangeEmailForm extends ImmutablePureComponent {
|
||||||
<fieldset disabled={this.state.isLoading}>
|
<fieldset disabled={this.state.isLoading}>
|
||||||
<FieldsGroup>
|
<FieldsGroup>
|
||||||
<TextInput
|
<TextInput
|
||||||
label='Email address'
|
label={intl.formatMessage(messages.emailFieldLabel)}
|
||||||
placeholder='me@example.com'
|
placeholder='me@example.com'
|
||||||
name='email'
|
name='email'
|
||||||
onChange={this.handleInputChange}
|
onChange={this.handleInputChange}
|
||||||
|
@ -89,7 +94,7 @@ class ChangeEmailForm extends ImmutablePureComponent {
|
||||||
/>
|
/>
|
||||||
<SimpleInput
|
<SimpleInput
|
||||||
type='password'
|
type='password'
|
||||||
label='Password'
|
label={intl.formatMessage(messages.passwordFieldLabel)}
|
||||||
name='password'
|
name='password'
|
||||||
onChange={this.handleInputChange}
|
onChange={this.handleInputChange}
|
||||||
value={this.state.password}
|
value={this.state.password}
|
||||||
|
@ -155,21 +160,21 @@ class ChangePasswordForm extends ImmutablePureComponent {
|
||||||
<FieldsGroup>
|
<FieldsGroup>
|
||||||
<SimpleInput
|
<SimpleInput
|
||||||
type='password'
|
type='password'
|
||||||
label='Current password'
|
label={intl.formatMessage(messages.oldPasswordFieldLabel)}
|
||||||
name='oldPassword'
|
name='oldPassword'
|
||||||
onChange={this.handleInputChange}
|
onChange={this.handleInputChange}
|
||||||
value={this.state.oldPassword}
|
value={this.state.oldPassword}
|
||||||
/>
|
/>
|
||||||
<SimpleInput
|
<SimpleInput
|
||||||
type='password'
|
type='password'
|
||||||
label='New password'
|
label={intl.formatMessage(messages.newPasswordFieldLabel)}
|
||||||
name='newPassword'
|
name='newPassword'
|
||||||
onChange={this.handleInputChange}
|
onChange={this.handleInputChange}
|
||||||
value={this.state.newPassword}
|
value={this.state.newPassword}
|
||||||
/>
|
/>
|
||||||
<SimpleInput
|
<SimpleInput
|
||||||
type='password'
|
type='password'
|
||||||
label='New password (again)'
|
label={intl.formatMessage(messages.confirmationFieldLabel)}
|
||||||
name='confirmation'
|
name='confirmation'
|
||||||
onChange={this.handleInputChange}
|
onChange={this.handleInputChange}
|
||||||
value={this.state.confirmation}
|
value={this.state.confirmation}
|
||||||
|
|
Loading…
Reference in a new issue