Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions plugins/change-password/js/ChangePasswordUserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,25 @@
} else {
this.reset(true);
rl.pluginRemoteRequest(
(iError, data) => {
iError => {
this.reset(false);
if (iError) {
this.passwordUpdateError(true);
if (131 === iError) {
// Notification.CurrentPasswordIncorrect
this.currentPasswordError(true);
}
this.errorDescription((data && rl.i18n(data.ErrorMessageAdditional))
|| rl.i18n('NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD'));
const errors = {
131: 'CURRENT_PASSWORD_INCORRECT',
132: 'NEW_PASSWORD_SHORT',
133: 'NEW_PASSWORD_WEAK',
134: 'NEW_PASSWORD_HIBP'
};

this.errorDescription(rl.i18n(
'NOTIFICATIONS/' +
(errors[iError] || 'COULD_NOT_SAVE_NEW_PASSWORD')
));
} else {
this.currentPassword('');
this.newPassword('');
Expand Down
2 changes: 1 addition & 1 deletion plugins/change-password/langs/de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL_REPEAT_PASSWORD = "Neues Passwort bestätigen"
BUTTON_UPDATE_PASSWORD = "Neues Passwort setzen"
ERROR_PASSWORD_MISMATCH = "Passwörter stimmen nicht überein; versuchen Sie es bitte erneut"
[NOTIFICATIONS]
CURRENT_PASSWORD_INCORRECT = "Aktuelles Passwort falsch"
COULD_NOT_SAVE_NEW_PASSWORD = "Passwort konnte nicht gespeichert werden"
CURRENT_PASSWORD_INCORRECT = "Aktuelles Passwort falsch"
NEW_PASSWORD_SHORT = "Passwort ist zu kurz"
NEW_PASSWORD_WEAK = "Passwort ist zu einfach"
Expand Down