DEV: Add outlet wrapper for user badges form (#29333)

* DEV: Add outlet wrapper for user badges form

* Add outlet for badge granter table

* add extra args to outlet
This commit is contained in:
Amanda Alves Branquinho 2024-10-24 11:10:10 -03:00 committed by GitHub
parent 2f1d1cd062
commit 0ecad3a7c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,13 @@
{{#if this.noAvailableBadges}}
<p>{{i18n "admin.badges.no_badges"}}</p>
{{else}}
<PluginOutlet
@name="badge-granter-form"
@outletArgs={{hash
availableBadges=this.availableBadges
userBadges=this.userBadges
}}
>
<form class="form-horizontal">
<div class="control-group">
<label>{{i18n "admin.badges.badge"}}</label>
@ -28,9 +35,8 @@
</div>
<div class="control-group">
<label>{{i18n "admin.badges.reason"}}</label>
<Input @type="text" @value={{this.badgeReason}} /><br /><small>{{i18n
"admin.badges.reason_help"
}}</small>
<Input @type="text" @value={{this.badgeReason}} /><br /><small
>{{i18n "admin.badges.reason_help"}}</small>
</div>
<DButton
@action={{this.performGrantBadge}}
@ -39,8 +45,17 @@
class="btn-primary"
/>
</form>
</PluginOutlet>
{{/if}}
<PluginOutlet
@name="badge-granter-table"
@outletArgs={{hash
groupedBadges=this.groupedBadges
revokeBadge=this.revokeBadge
expandGroup=this.expandGroup
}}
>
<table id="user-badges">
<tbody>
<tr>
@ -95,5 +110,6 @@
{{/each}}
</tbody>
</table>
</PluginOutlet>
</div>
</ConditionalLoadingSpinner>