FIX: dual modal when deleting spammer in the flag modal
This commit is contained in:
parent
521cb6bd0d
commit
fd6dd88afb
|
@ -15,18 +15,6 @@ Discourse.AdminFlagsRouteType = Discourse.Route.extend({
|
|||
adminFlagsController.set('query', this.get('filter'));
|
||||
},
|
||||
|
||||
actions: {
|
||||
/**
|
||||
Deletes a user and all posts and topics created by that user.
|
||||
|
||||
@method deleteSpammer
|
||||
**/
|
||||
deleteSpammer: function (user) {
|
||||
this.send('closeModal');
|
||||
user.deleteAsSpammer(function() { window.location.reload(); });
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Discourse.AdminFlagsActiveRoute = Discourse.AdminFlagsRouteType.extend({
|
||||
|
|
|
@ -136,7 +136,16 @@ var ApplicationRoute = Em.Route.extend({
|
|||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
Deletes a user and all posts and topics created by that user.
|
||||
|
||||
@method deleteSpammer
|
||||
**/
|
||||
deleteSpammer: function (user) {
|
||||
this.send('closeModal');
|
||||
user.deleteAsSpammer(function() { window.location.reload(); });
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
{{/if}}
|
||||
|
||||
{{#if canDeleteSpammer}}
|
||||
<button class="btn btn-danger" {{action deleteSpammer}} {{bind-attr disabled="submitDisabled"}} title="{{i18n flagging.delete_spammer}}"><i class="fa fa-exclamation-triangle"></i> {{i18n flagging.delete_spammer}}</button>
|
||||
<button class="btn btn-danger" {{action deleteSpammer userDetails}} {{bind-attr disabled="submitDisabled"}} title="{{i18n flagging.delete_spammer}}"><i class="fa fa-exclamation-triangle"></i> {{i18n flagging.delete_spammer}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue