mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-09-01 00:17:13 +00:00
Merge pull request #7344 from smpaz7467/fix/forced-pw-change-raw-lang-key
[Web] translate password errors in the forced password change modal
This commit is contained in:
@@ -473,6 +473,10 @@ function recursiveBase64StrToArrayBuffer(obj) {
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
var msg = (data && data[0] && data[0].msg) ? data[0].msg : 'Password change failed.';
|
var msg = (data && data[0] && data[0].msg) ? data[0].msg : 'Password change failed.';
|
||||||
|
// the API returns raw language keys, resolve them like the alert box does
|
||||||
|
if (Object.prototype.hasOwnProperty.call(lang_danger, msg)) {
|
||||||
|
msg = lang_danger[msg];
|
||||||
|
}
|
||||||
$('#changePWAlert').show().text(msg);
|
$('#changePWAlert').show().text(msg);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user