1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

change error message (#7193)

This commit is contained in:
Michael An
2024-12-16 12:15:11 +08:00
committed by GitHub
parent 156de7fd6d
commit 034d756f06
4 changed files with 4 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ const UserSetPassword = ({ toggle }) => {
return;
}
if (!validatePassword(password)) {
setErrorMessage(gettext('Insufficient password strength'));
setErrorMessage(gettext('Password strength should be strong or very strong'));
return;
}

View File

@@ -39,7 +39,7 @@ const UserUpdatePassword = ({ toggle }) => {
setErrorMessage(gettext('New password cannot be the same as old password'));
}
if (!validatePassword(newPassword)) {
setErrorMessage(gettext('Insufficient password strength'));
setErrorMessage(gettext('Password strength should be strong or very strong'));
return;
}
setErrorMessage('');

View File

@@ -228,7 +228,7 @@ class ResetPasswordView(APIView):
return api_error(status.HTTP_400_BAD_REQUEST, 'New password cannot be the same as old password')
if not is_password_strength_valid(new_password):
return api_error(status.HTTP_400_BAD_REQUEST, 'Insufficient password strength')
return api_error(status.HTTP_400_BAD_REQUEST, 'Password strength should be strong or very strong')
user = request.user
if user.enc_password != UNUSABLE_PASSWORD and not old_password:

View File

@@ -4,7 +4,7 @@ function isMobile() {
return (typeof (window) !== 'undefined') && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
}
var passwd_tip = "{% blocktrans %}Insufficient password strength{% endblocktrans%}";
var passwd_tip = "{% blocktrans %}Password strength should be strong or very strong{% endblocktrans%}";
var template = `
<div class="popover show registration-form-popover" role="tooltip">