Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel

This commit is contained in:
SachaG 2017-08-29 18:06:53 +09:00
commit b7dbddfd8b
2 changed files with 4 additions and 3 deletions

View file

@ -234,7 +234,7 @@ export class AccountsLoginForm extends Tracker.Component {
type: 'password',
required: true,
onChange: this.handleChange.bind(this, 'newPassword'),
message: this.getMessageForField('newPassword'),
message: this.getMessageForField('password'),
};
}
@ -857,7 +857,7 @@ export class AccountsLoginForm extends Tracker.Component {
Accounts.resetPassword(token, newPassword, (error) => {
if (error) {
const errorId = `accounts.error_${error.reason.toLowerCase().replace(/ /g, '_')}`;
this.showMessage(this.context.intl.formatMessage({id: errorId}) || 'accounts.error_unknown' && errorId, 'error');
this.showMessage(errorId, 'error');
onSubmitHook(error, formState);
}
else {
@ -874,7 +874,7 @@ export class AccountsLoginForm extends Tracker.Component {
Accounts.changePassword(password, newPassword, (error) => {
if (error) {
const errorId = `accounts.error_${error.reason.toLowerCase().replace(/ /g, '_')}`;
this.showMessage(this.context.intl.formatMessage({id:errorId}) || 'accounts.error_unknown' && errorId, 'error');
this.showMessage(errorId, 'error');
onSubmitHook(error, formState);
}
else {

View file

@ -12,6 +12,7 @@ addStrings('en', {
"accounts.error_username_already_exists": "Username already exists",
"accounts.enter_username_or_email": "Enter username or email",
"accounts.error_internal_server_error": "Internal server error",
"accounts.error_token_expired": "Invalid password reset token",
"accounts.username_or_email": "Username or email",
"accounts.enter_username": "Enter username",
"accounts.username": "Username",