mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
0e9d4e6792
Refs #4001 - grunt-jscs@0.8.1 which provides ES6 support.
34 lines
937 B
JavaScript
34 lines
937 B
JavaScript
var DeleteUserController = Ember.Controller.extend({
|
|
actions: {
|
|
confirmAccept: function () {
|
|
var self = this,
|
|
user = this.get('model');
|
|
|
|
user.destroyRecord().then(function () {
|
|
self.store.unloadAll('post');
|
|
self.transitionToRoute('settings.users');
|
|
self.notifications.showSuccess('The user has been deleted.', {delayed: true});
|
|
}, function () {
|
|
self.notifications.showError('The user could not be deleted. Please try again.');
|
|
});
|
|
},
|
|
|
|
confirmReject: function () {
|
|
return false;
|
|
}
|
|
},
|
|
|
|
confirm: {
|
|
accept: {
|
|
text: 'Delete User',
|
|
buttonClass: 'btn btn-red'
|
|
},
|
|
reject: {
|
|
text: 'Cancel',
|
|
buttonClass: 'btn btn-default btn-minor'
|
|
}
|
|
}
|
|
});
|
|
|
|
export default DeleteUserController;
|