mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 03:23:44 +08:00
1c87bb7fe9
1. Use `this.` instead of `{{action}}` where applicable 2. Use `{{fn}}` instead of `@actionParam` where applicable 3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded 4. Remove `btn` class (it's added automatically to all DButtons) 5. Remove `type="button"` (it's the default) 6. Use `concat-class` helper
43 lines
952 B
Handlebars
43 lines
952 B
Handlebars
{{#if this.selectKit.options.showFullTitle}}
|
|
<div
|
|
lang={{this.lang}}
|
|
title={{this.title}}
|
|
data-value={{this.value}}
|
|
data-name={{this.name}}
|
|
class="select-kit-selected-name selected-name choice"
|
|
>
|
|
{{#if this.selectKit.options.formName}}
|
|
<input
|
|
type="hidden"
|
|
name={{this.selectKit.options.formName}}
|
|
value={{this.value}}
|
|
/>
|
|
{{/if}}
|
|
|
|
{{#if this.item.icon}}
|
|
{{d-icon this.item.icon}}
|
|
{{/if}}
|
|
|
|
<span class="name">
|
|
{{this.label}}
|
|
</span>
|
|
|
|
{{#if this.shouldDisplayClearableButton}}
|
|
<DButton
|
|
@icon="times"
|
|
@action={{fn this.selectKit.deselect this.item}}
|
|
@ariaLabel="clear_input"
|
|
class="btn-clear"
|
|
/>
|
|
{{/if}}
|
|
</div>
|
|
{{else}}
|
|
{{#if this.item.icon}}
|
|
<div
|
|
lang={{this.lang}}
|
|
class="select-kit-selected-name selected-name choice"
|
|
>
|
|
{{d-icon this.item.icon}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}} |