2022-06-30 06:30:50 -04:00
|
|
|
<DModalBody @title="admin.user.suspend_modal_title">
|
2022-07-05 13:41:31 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.loadingUser}}>
|
2017-09-13 13:06:41 -04:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.errorMessage}}
|
|
|
|
<div class="alert alert-error">{{this.errorMessage}}</div>
|
2020-11-03 10:38:56 -05:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.user.canSuspend}}
|
|
|
|
<AdminPenaltyHistory @user={{this.user}} />
|
2021-07-12 14:36:56 -04:00
|
|
|
|
2017-09-14 14:10:39 -04:00
|
|
|
<div class="until-controls">
|
|
|
|
<label>
|
2022-07-05 13:41:31 -04:00
|
|
|
<FutureDateInput @class="suspend-until" @label="admin.user.suspend_duration" @clearable={{false}} @input={{this.suspendUntil}} @onChangeInput={{action (mut this.suspendUntil)}} />
|
2017-09-14 14:10:39 -04:00
|
|
|
</label>
|
2017-09-13 13:06:41 -04:00
|
|
|
</div>
|
2022-07-05 13:41:31 -04:00
|
|
|
<SuspensionDetails @reason={{this.reason}} @message={{this.message}} />
|
2017-09-13 13:06:41 -04:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.postId}}
|
|
|
|
<PenaltyPostAction @postId={{this.postId}} @postAction={{this.postAction}} @postEdit={{this.postEdit}} />
|
2018-01-30 16:31:29 -05:00
|
|
|
{{/if}}
|
|
|
|
|
2017-09-14 14:10:39 -04:00
|
|
|
{{else}}
|
|
|
|
<div class="cant-suspend">
|
|
|
|
{{i18n "admin.user.cant_suspend"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-06-30 06:30:50 -04:00
|
|
|
</ConditionalLoadingSpinner>
|
2017-09-12 16:06:01 -04:00
|
|
|
|
2022-06-30 06:30:50 -04:00
|
|
|
</DModalBody>
|
2016-11-15 17:09:55 -05:00
|
|
|
|
2013-11-01 10:47:03 -04:00
|
|
|
<div class="modal-footer">
|
2022-07-05 13:41:31 -04:00
|
|
|
<DButton @class="btn-danger perform-suspend" @action={{action "suspend"}} @disabled={{this.submitDisabled}} @icon="ban" @label="admin.user.suspend" />
|
2022-06-30 06:30:50 -04:00
|
|
|
<DModalCancel @close={{route-action "closeModal"}} />
|
2022-07-05 13:41:31 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.loading}} @size="small" />
|
2013-11-01 10:47:03 -04:00
|
|
|
</div>
|