mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: delete spammer wasn't working in /admin/flags
This commit is contained in:
parent
dde2fbd391
commit
30eaa0e1c5
3 changed files with 6 additions and 8 deletions
|
@ -7,5 +7,5 @@
|
|||
{{/if}}
|
||||
<button title="{{i18n 'admin.flags.agree_flag_title'}}" {{action "agreeFlagKeepPost"}} class="btn"><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree_flag'}}</button>
|
||||
{{#if model.canDeleteAsSpammer}}
|
||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" model.user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<button title="{{i18n 'admin.flags.delete_post_defer_flag_title'}}" {{action "deletePostDeferFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-external-link"></i>{{i18n 'admin.flags.delete_post_defer_flag'}}</button>
|
||||
<button title="{{i18n 'admin.flags.delete_post_agree_flag_title'}}" {{action "deletePostAgreeFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.delete_post_agree_flag'}}</button>
|
||||
{{#if model.canDeleteAsSpammer}}
|
||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" model.user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||
{{/if}}
|
||||
|
|
|
@ -122,12 +122,10 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||
this.fetchUserDetails();
|
||||
}.observes('model.username'),
|
||||
|
||||
fetchUserDetails: function() {
|
||||
if( Discourse.User.currentProp('staff') && this.get('model.username') ) {
|
||||
const flagController = this;
|
||||
Discourse.AdminUser.find(this.get('model.username').toLowerCase()).then(function(user){
|
||||
flagController.set('userDetails', user);
|
||||
});
|
||||
fetchUserDetails() {
|
||||
if (Discourse.User.currentProp('staff') && this.get('model.username')) {
|
||||
Discourse.AdminUser.find(this.get('model.username').toLowerCase())
|
||||
.then(user => this.set('userDetails', user));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue