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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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('');
|
||||
|
@@ -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:
|
||||
|
@@ -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">
|
||||
|
Reference in New Issue
Block a user