mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
Refactor user suspension modal
This commit is contained in:
@ -6,6 +6,7 @@ import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
export default Ember.Controller.extend(CanCheckEmails, {
|
||||
adminTools: Ember.inject.service(),
|
||||
editingUsername: false,
|
||||
editingName: false,
|
||||
editingTitle: false,
|
||||
@ -64,6 +65,11 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
||||
anonymize() { return this.get('model').anonymize(); },
|
||||
destroy() { return this.get('model').destroy(); },
|
||||
|
||||
showSuspendModal() {
|
||||
this.get('adminTools').showSuspendModal(this.get('model'));
|
||||
},
|
||||
|
||||
|
||||
toggleUsernameEdit() {
|
||||
this.set('userUsernameValue', this.get('model.username'));
|
||||
this.toggleProperty('editingUsername');
|
||||
|
Reference in New Issue
Block a user