mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 11:23:40 +08:00
16ea7ab248
Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
37 lines
1.2 KiB
Handlebars
37 lines
1.2 KiB
Handlebars
<DModalBody @title="admin.user.suspend_modal_title">
|
|
<ConditionalLoadingSpinner @condition={{loadingUser}}>
|
|
|
|
{{#if errorMessage}}
|
|
<div class="alert alert-error">{{errorMessage}}</div>
|
|
{{/if}}
|
|
|
|
{{#if user.canSuspend}}
|
|
<AdminPenaltyHistory @user={{user}} />
|
|
|
|
<div class="until-controls">
|
|
<label>
|
|
<FutureDateInput @class="suspend-until" @label="admin.user.suspend_duration" @clearable={{false}} @input={{suspendUntil}} @onChangeInput={{action (mut suspendUntil)}} />
|
|
</label>
|
|
</div>
|
|
<SuspensionDetails @reason={{reason}} @message={{message}} />
|
|
|
|
{{#if postId}}
|
|
<PenaltyPostAction @postId={{postId}} @postAction={{postAction}} @postEdit={{postEdit}} />
|
|
{{/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={{submitDisabled}} @icon="ban" @label="admin.user.suspend" />
|
|
<DModalCancel @close={{route-action "closeModal"}} />
|
|
<ConditionalLoadingSpinner @condition={{loading}} @size="small" />
|
|
</div>
|