FEATURE: add silence reason dropdown to admin penalty reason

Adds dropdown list for pre-defined penalty options to silence to
mirror options on suspension list.
This commit is contained in:
Jeff Wong 2023-09-05 15:42:02 -07:00
parent 7cc5501cfd
commit a8324395e9
1 changed files with 16 additions and 7 deletions

View File

@ -18,15 +18,24 @@
/>
{{/if}}
{{else if (eq @penaltyType "silence")}}
<label class="silence-reason-title">{{html-safe
(i18n "admin.user.silence_reason_label")
}}</label>
<TextField
@value={{this.customReason}}
<label class="silence-reason-title">
{{html-safe (i18n "admin.user.silence_reason_label")}}</label>
<ComboBox
@content={{this.reasons}}
@value={{this.selectedReason}}
@class="silence-reason"
@onChange={{this.setCustomReason}}
@placeholderKey="admin.user.silence_reason_placeholder"
@onChange={{this.setSelectedReason}}
/>
{{#if this.isCustomReason}}
<TextField
@value={{this.customReason}}
@class="silence-reason"
@onChange={{this.setCustomReason}}
@placeholderKey="admin.user.silence_reason_placeholder"
/>
{{/if}}
{{/if}}
</div>