2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.collection}}
|
2020-06-04 10:44:54 -04:00
|
|
|
<div class="values">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.collection as |value index|}}
|
2020-06-04 10:44:54 -04:00
|
|
|
<div data-index={{index}} class="value">
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton
|
|
|
|
@action={{action "removeValue"}}
|
|
|
|
@actionParam={{value}}
|
|
|
|
@icon="times"
|
|
|
|
@class="remove-value-btn btn-small"
|
|
|
|
/>
|
2020-06-04 10:44:54 -04:00
|
|
|
|
2022-07-08 07:00:33 -04:00
|
|
|
<Input
|
|
|
|
title={{value}}
|
|
|
|
@value={{value}}
|
|
|
|
class="value-input"
|
|
|
|
{{on "focusout" (fn (action "changeValue") index)}}
|
|
|
|
/>
|
2022-02-03 16:47:02 -05:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.showUpDownButtons}}
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton
|
|
|
|
@action={{action "shift" -1 index}}
|
|
|
|
@icon="arrow-up"
|
|
|
|
@class="shift-up-value-btn btn-small"
|
|
|
|
/>
|
|
|
|
<DButton
|
|
|
|
@action={{action "shift" 1 index}}
|
|
|
|
@icon="arrow-down"
|
|
|
|
@class="shift-down-value-btn btn-small"
|
|
|
|
/>
|
2022-02-03 16:47:02 -05:00
|
|
|
{{/if}}
|
2020-06-04 10:44:54 -04:00
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div class="simple-list-input">
|
2022-07-06 04:37:54 -04:00
|
|
|
<Input
|
|
|
|
@type="text"
|
|
|
|
@value={{this.newValue}}
|
|
|
|
placeholder={{i18n "admin.site_settings.simple_list.add_item"}}
|
|
|
|
class="add-value-input"
|
|
|
|
autocomplete="off"
|
|
|
|
autocorrect="off"
|
|
|
|
autocapitalize="off"
|
|
|
|
/>
|
2020-06-04 10:44:54 -04:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
<DButton
|
|
|
|
@action={{action "addValue"}}
|
|
|
|
@actionParam={{this.newValue}}
|
|
|
|
@disabled={{this.inputEmpty}}
|
|
|
|
@icon="plus"
|
|
|
|
@class="add-value-btn btn-small"
|
|
|
|
/>
|
2020-06-04 10:44:54 -04:00
|
|
|
</div>
|