discourse/app/assets/javascripts/admin/addon/templates/modal/admin-suspend-user.hbs
Bianca Nenciu 187b0bfb43
FEATURE: Show similar users when penalizing a user (#19334)
* FEATURE: Show similar users when penalizing a user

Moderators will be notified if other users with the same IP address
exist before penalizing a user.

* FEATURE: Allow staff to penalize multiple users

This allows staff members to suspend or silence multiple users belonging
to the same person.
2022-12-08 14:42:33 +02:00

40 lines
1.4 KiB
Handlebars

<DModalBody @title="admin.user.suspend_modal_title">
<ConditionalLoadingSpinner @condition={{this.loadingUser}}>
{{#if this.errorMessage}}
<div class="alert alert-error">{{this.errorMessage}}</div>
{{/if}}
{{#if this.user.canSuspend}}
<AdminPenaltyHistory @user={{this.user}} />
<div class="until-controls">
<label>
<FutureDateInput @class="suspend-until" @label="admin.user.suspend_duration" @clearable={{false}} @input={{this.suspendUntil}} @onChangeInput={{action (mut this.suspendUntil)}} />
</label>
</div>
<SuspensionDetails @reason={{this.reason}} @message={{this.message}} />
{{#if this.postId}}
<PenaltyPostAction @postId={{this.postId}} @postAction={{this.postAction}} @postEdit={{this.postEdit}} />
{{/if}}
{{#if this.user.similar_users}}
<AdminPenaltySimilarUsers @type="suspend" @user={{this.user}} @selectedUserIds={{this.otherUserIds}} />
{{/if}}
{{else}}
<div class="cant-suspend">
{{i18n "admin.user.cant_suspend"}}
</div>
{{/if}}
</ConditionalLoadingSpinner>
</DModalBody>
<div class="modal-footer">
<DButton @class="btn-danger perform-suspend" @action={{action "suspend"}} @disabled={{this.submitDisabled}} @icon="ban" @label="admin.user.suspend" />
<DModalCancel @close={{route-action "closeModal"}} />
<ConditionalLoadingSpinner @condition={{this.loading}} @size="small" />
</div>