mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 03:41:12 +00:00
change error message (#7193)
This commit is contained in:
@@ -31,7 +31,7 @@ const UserSetPassword = ({ toggle }) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!validatePassword(password)) {
|
if (!validatePassword(password)) {
|
||||||
setErrorMessage(gettext('Insufficient password strength'));
|
setErrorMessage(gettext('Password strength should be strong or very strong'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ const UserUpdatePassword = ({ toggle }) => {
|
|||||||
setErrorMessage(gettext('New password cannot be the same as old password'));
|
setErrorMessage(gettext('New password cannot be the same as old password'));
|
||||||
}
|
}
|
||||||
if (!validatePassword(newPassword)) {
|
if (!validatePassword(newPassword)) {
|
||||||
setErrorMessage(gettext('Insufficient password strength'));
|
setErrorMessage(gettext('Password strength should be strong or very strong'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setErrorMessage('');
|
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')
|
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):
|
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
|
user = request.user
|
||||||
if user.enc_password != UNUSABLE_PASSWORD and not old_password:
|
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);
|
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 = `
|
var template = `
|
||||||
<div class="popover show registration-form-popover" role="tooltip">
|
<div class="popover show registration-form-popover" role="tooltip">
|
||||||
|
Reference in New Issue
Block a user