Tests + Refactoring for Suspension Modal

This commit is contained in:
Robin Ward
2017-09-13 14:11:33 -04:00
parent 6e48884274
commit 2a56cf8bb6
9 changed files with 112 additions and 44 deletions

View File

@ -58,7 +58,6 @@ export default Ember.Controller.extend(CanCheckEmails, {
saveTrustLevel() { return this.get("model").saveTrustLevel(); },
restoreTrustLevel() { return this.get("model").restoreTrustLevel(); },
lockTrustLevel(locked) { return this.get("model").lockTrustLevel(locked); },
unsuspend() { return this.get("model").unsuspend(); },
unblock() { return this.get("model").unblock(); },
block() { return this.get("model").block(); },
deleteAllPosts() { return this.get("model").deleteAllPosts(); },
@ -68,6 +67,9 @@ export default Ember.Controller.extend(CanCheckEmails, {
showSuspendModal() {
this.get('adminTools').showSuspendModal(this.get('model'));
},
unsuspend() {
this.get("model").unsuspend().catch(popupAjaxError);
},
toggleUsernameEdit() {