app/templates/components/modals/report-content.hbs
{{#bootstrap/bs-modal
id=modalId
onClose=onClose as |modal|}}
{{#if hasReported}}
{{#modal.header}}
<div class="alert alert-danger">
<p>{{t "reaction-modal.modals.report-content.header"}}</p>
<small>{{t "reaction-modal.modals.report-content.status" status=report.status}}</small>
</div>
{{/modal.header}}
{{/if}}
{{#modal.body}}
<p>{{t "reaction-modal.modals.report-content.reason"}}</p>
{{! Reason Select }}
<div class="m-b-1">
{{#power-select
renderInPlace=true
searchEnabled=false
selected=reason
options=reasons
placeholder="Reason"
onchange=(action (mut reason)) as |reason|
}}
{{reason}}
{{/power-select}}
</div>
{{! Explanation }}
{{expanding-textarea
update=(action (mut explanation))
placeholder=explanationPlaceholder
class="form-control report-content-input"}}
{{/modal.body}}
{{#modal.footer}}
<button class="button button--primary btn-lg btn-block" disabled={{unless canSubmit "disabled"}} onclick={{perform createReport}}>
{{#if createReport.isRunning}}
{{loading-spinner size="small"}}
{{else}}
{{t "reaction-modal.modals.report-content.submit"}}
{{/if}}
</button>
{{/modal.footer}}
{{/bootstrap/bs-modal}}