Make password reset logic translatable
This commit is contained in:
@@ -390,7 +390,12 @@
|
||||
},
|
||||
"changePasswordAction": "Change Password",
|
||||
"disable2FAAction": "Disable 2FA",
|
||||
"enable2FAAction": "Enable 2FA"
|
||||
"enable2FAAction": "Enable 2FA",
|
||||
"passwordResetAction": "I forgot my password",
|
||||
"passwordResetNotification": {
|
||||
"title": "Password reset successful",
|
||||
"body": "Email sent to {{ email }}"
|
||||
}
|
||||
},
|
||||
"backups": {
|
||||
"title": "Backups",
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="text-right">
|
||||
<a href="" ng-click="sendPasswordReset()">I forgot my password</a>
|
||||
<a href="" ng-click="sendPasswordReset()">{{ 'profile.passwordResetAction' | tr }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
|
||||
@@ -21,7 +21,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
Client.sendPasswordReset(function (error) {
|
||||
if (error) return console.error('Failed to reset password:', error);
|
||||
|
||||
Client.notify('Password reset successful', 'Email sent to ' + $scope.user.fallbackEmail, false, 'success');
|
||||
Client.notify($translate.instant('profile.passwordResetNotification.title'), $translate.instant('profile.passwordResetNotification.body', { email: $scope.user.fallbackEmail}), false, 'success');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user