Jarek Radosz 1c87bb7fe9
DEV: Update DButton uses (#23333)
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
2023-08-31 11:49:35 +02:00

45 lines
1.1 KiB
Handlebars

{{#if this.collection}}
<div class="values">
{{#each this.collection as |value index|}}
<div class="value" data-index={{index}}>
<DButton
@action={{fn this.removeValue value}}
@icon="times"
class="remove-value-btn btn-small"
/>
<Input
@value={{value.key}}
class="value-input"
{{on "focusout" (fn (action "changeKey") index)}}
/>
<Input
@value={{value.secret}}
class="value-input"
@type={{if this.isSecret "password" "text"}}
{{on "focusout" (fn (action "changeSecret") index)}}
/>
</div>
{{/each}}
</div>
{{/if}}
<div class="value">
<TextField
@value={{this.newKey}}
@class="new-value-input key"
@placeholder={{this.setting.placeholder.key}}
/>
<Input
@type="password"
@value={{this.newSecret}}
class="new-value-input secret"
placeholder={{this.setting.placeholder.value}}
/>
<DButton
@action={{this.addValue}}
@icon="plus"
class="add-value-btn btn-small"
/>
</div>
<SettingValidationMessage @message={{this.validationMessage}} />