mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merge pull request #3615 from jaswilli/cleanup
Cleanup from notifications refactor.
This commit is contained in:
commit
2a17134c21
4 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,7 @@ var InviteNewUserController = Ember.Controller.extend({
|
||||||
if (newUser.get('status') === 'invited-pending') {
|
if (newUser.get('status') === 'invited-pending') {
|
||||||
self.notifications.showWarn('Invitation email was not sent. Please try resending.');
|
self.notifications.showWarn('Invitation email was not sent. Please try resending.');
|
||||||
} else {
|
} else {
|
||||||
self.notifications.showSuccess(notificationText, false);
|
self.notifications.showSuccess(notificationText);
|
||||||
}
|
}
|
||||||
}).catch(function (errors) {
|
}).catch(function (errors) {
|
||||||
newUser.deleteRecord();
|
newUser.deleteRecord();
|
||||||
|
|
|
@ -94,7 +94,7 @@ var SettingsUserController = Ember.ObjectController.extend({
|
||||||
self.notifications.showWarn('Invitation email was not sent. Please try resending.');
|
self.notifications.showWarn('Invitation email was not sent. Please try resending.');
|
||||||
} else {
|
} else {
|
||||||
self.get('model').set('status', result.users[0].status);
|
self.get('model').set('status', result.users[0].status);
|
||||||
self.notifications.showSuccess(notificationText, false);
|
self.notifications.showSuccess(notificationText);
|
||||||
}
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
self.notifications.showAPIError(error);
|
self.notifications.showAPIError(error);
|
||||||
|
|
|
@ -5,7 +5,7 @@ var ResetRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
||||||
classNames: ['ghost-reset'],
|
classNames: ['ghost-reset'],
|
||||||
beforeModel: function () {
|
beforeModel: function () {
|
||||||
if (this.get('session').isAuthenticated) {
|
if (this.get('session').isAuthenticated) {
|
||||||
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', true);
|
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', { delayed: true });
|
||||||
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@ var SignupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
||||||
classNames: ['ghost-signup'],
|
classNames: ['ghost-signup'],
|
||||||
beforeModel: function () {
|
beforeModel: function () {
|
||||||
if (this.get('session').isAuthenticated) {
|
if (this.get('session').isAuthenticated) {
|
||||||
this.notifications.showWarn('You need to sign out to register as a new user.', true);
|
this.notifications.showWarn('You need to sign out to register as a new user.', { delayed: true });
|
||||||
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue