discourse/app/assets/javascripts/admin/addon/templates/modal/admin-suspend-user.hbs
Jarek Radosz 16ea7ab248
DEV: Run angle-brackets codemod (#17286)
Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-06-30 12:30:50 +02:00

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>