mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
Updated error copy on setup page
This commit is contained in:
parent
3a9ea11213
commit
59fb35592d
@ -161,7 +161,7 @@ export default class SetupController extends Controller.extend(ValidationEngine)
|
||||
this._handleSaveError(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.set('flowErrors', 'Please fill out every field correctly to set up your blog.');
|
||||
this.set('flowErrors', 'Please fill out every field correctly to set up your site.');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
.gh-setup .gh-flow-content h1 {
|
||||
margin-bottom: 0;
|
||||
margin-bottom: .3em;
|
||||
}
|
||||
|
||||
.gh-setup .gh-flow-content p {
|
||||
|
@ -65,7 +65,7 @@ export default Mixin.create({
|
||||
|
||||
// password must be longer than 10 characters
|
||||
if (!validator.isLength(password || '', 10)) {
|
||||
model.get('errors').add(errorTarget, 'Password must be at least 10 characters long');
|
||||
model.get('errors').add(errorTarget, 'Password must be at least 10 characters long.');
|
||||
return this.invalidate();
|
||||
}
|
||||
|
||||
@ -74,40 +74,40 @@ export default Mixin.create({
|
||||
// dissallow password from badPasswords list (e. g. '1234567890')
|
||||
BAD_PASSWORDS.map((badPassword) => {
|
||||
if (badPassword === password) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
});
|
||||
|
||||
// password must not match with users' email
|
||||
if (password.toLowerCase() === model.get('email').toLowerCase()) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
// password must not contain the words 'ghost', 'password', or 'passw0rd'
|
||||
DISALLOWED_PASSWORDS.map((disallowedPassword) => {
|
||||
if (password.toLowerCase().indexOf(disallowedPassword) >= 0) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
});
|
||||
|
||||
// password must not match with blog title
|
||||
if (password.toLowerCase() === blogTitle) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
// password must not match with blog URL (without protocol, with or without trailing slash)
|
||||
if (password.toLowerCase() === blogUrl || password.toLowerCase() === blogUrlWithSlash) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
// dissallow passwords where 50% or more of characters are the same
|
||||
if (!this._characterOccurance(password)) {
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password');
|
||||
model.get('errors').add(errorTarget, 'Sorry, you cannot use an insecure password.');
|
||||
this.invalidate();
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export default NewUserValidator.create({
|
||||
let blogTitle = model.get('blogTitle');
|
||||
|
||||
if (!validator.isLength(blogTitle || '', 1)) {
|
||||
model.get('errors').add('blogTitle', 'Please enter a blog title.');
|
||||
model.get('errors').add('blogTitle', 'Please enter a site title.');
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user