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