mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 18:30:53 +00:00
['settings' page] WebDav Password: redesigned the 'update password' dialog; fixup & improvement
This commit is contained in:
@@ -151,11 +151,11 @@ class GenerateUploadLink extends React.Component {
|
||||
// check password params
|
||||
if (showPasswordInput) {
|
||||
if (password.length === 0) {
|
||||
this.setState({errorInfo: gettext('Please enter password')});
|
||||
this.setState({errorInfo: gettext('Please enter a password.')});
|
||||
return false;
|
||||
}
|
||||
if (password.length < shareLinkPasswordMinLength) {
|
||||
this.setState({errorInfo: gettext('Password is too short')});
|
||||
this.setState({errorInfo: gettext('The password is too short.')});
|
||||
return false;
|
||||
}
|
||||
if (password !== passwordnew) {
|
||||
@@ -163,7 +163,7 @@ class GenerateUploadLink extends React.Component {
|
||||
return false;
|
||||
}
|
||||
if (Utils.getStrengthLevel(password) < shareLinkPasswordStrengthLevel) {
|
||||
this.setState({errorInfo: gettext('Password is too weak, should have at least {shareLinkPasswordStrengthLevel} of the following: num, upper letter, lower letter and other symbols'.replace('{shareLinkPasswordStrengthLevel}', shareLinkPasswordStrengthLevel))});
|
||||
this.setState({errorInfo: gettext('The password is too weak. It should include at least {passwordStrengthLevel} of the following: number, upper letter, lower letter and other symbols.').replace('{passwordStrengthLevel}', shareLinkPasswordStrengthLevel)});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -267,9 +267,9 @@ class GenerateUploadLink extends React.Component {
|
||||
|
||||
const { isSendLinkShown } = this.state;
|
||||
|
||||
let passwordLengthTip = gettext('(at least {passwordLength} characters and has {shareLinkPasswordStrengthLevel} of the following: num, upper letter, lower letter and other symbols)');
|
||||
passwordLengthTip = passwordLengthTip.replace('{passwordLength}', shareLinkPasswordMinLength)
|
||||
.replace('{shareLinkPasswordStrengthLevel}', shareLinkPasswordStrengthLevel);
|
||||
let passwordLengthTip = gettext('(at least {passwordMinLength} characters and includes {passwordStrengthLevel} of the following: number, upper letter, lower letter and other symbols)');
|
||||
passwordLengthTip = passwordLengthTip.replace('{passwordMinLength}', shareLinkPasswordMinLength)
|
||||
.replace('{passwordStrengthLevel}', shareLinkPasswordStrengthLevel);
|
||||
|
||||
if (this.state.sharedUploadInfo) {
|
||||
let sharedUploadInfo = this.state.sharedUploadInfo;
|
||||
|
Reference in New Issue
Block a user