2021-06-18 16:39:02 +03:00
|
|
|
{{#unless this.benefitItem.isNew}}
|
|
|
|
<span class="gh-blognav-grab">
|
|
|
|
{{svg-jar "grab"}}
|
|
|
|
<span class="sr-only">Reorder</span>
|
|
|
|
</span>
|
|
|
|
{{/unless}}
|
|
|
|
|
2021-09-02 17:01:25 +03:00
|
|
|
<div class="gh-blognav-line {{unless this.name "placeholder"}}">
|
|
|
|
{{svg-jar "check-2"}}
|
2021-06-18 16:39:02 +03:00
|
|
|
<GhValidationStatusContainer
|
|
|
|
@tagName="span"
|
|
|
|
@class="gh-blognav-label"
|
|
|
|
@errors={{this.benefitItem.errors}}
|
2021-06-28 12:49:54 +03:00
|
|
|
@property="name"
|
2021-06-18 16:39:02 +03:00
|
|
|
@hasValidated={{this.benefitItem.hasValidated}}
|
|
|
|
>
|
|
|
|
<GhTrimFocusInput
|
|
|
|
@shouldFocus={{this.benefitItem.last}}
|
2022-01-19 10:34:08 +03:00
|
|
|
@placeholder={{if this.isFreeProduct "Access to all public posts" "Expert analysis"}}
|
2021-06-28 12:49:54 +03:00
|
|
|
@value={{readonly this.name}}
|
2021-06-18 16:39:02 +03:00
|
|
|
@input={{action "updateLabel" value="target.value"}}
|
|
|
|
@keyPress={{action "clearLabelErrors"}}
|
2021-08-20 11:49:50 +03:00
|
|
|
@stopEnterKeyDownPropagation={{true}}
|
2022-02-19 01:36:01 +03:00
|
|
|
@focus-out={{action "updateLabel" this.name}}
|
|
|
|
data-test-input="benefit-label" />
|
|
|
|
|
2021-06-18 16:39:02 +03:00
|
|
|
<GhErrorMessage
|
|
|
|
@errors={{this.benefitItem.errors}}
|
2022-02-19 01:36:01 +03:00
|
|
|
@property="name"
|
|
|
|
data-test-error="benefit-label" />
|
2021-06-18 16:39:02 +03:00
|
|
|
</GhValidationStatusContainer>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if this.benefitItem.isNew}}
|
2022-02-19 01:36:01 +03:00
|
|
|
<button type="button" class="gh-blognav-add" {{action "addItem" this.benefitItem}} data-test-button="add-benefit">
|
2021-06-18 16:39:02 +03:00
|
|
|
{{svg-jar "add"}}<span class="sr-only">Add</span>
|
|
|
|
</button>
|
|
|
|
{{else}}
|
2022-02-19 01:36:01 +03:00
|
|
|
<button type="button" class="gh-blognav-delete" {{action "deleteItem" this.benefitItem}} data-test-button="delete-benefit">
|
2021-06-18 16:39:02 +03:00
|
|
|
{{svg-jar "trash"}}<span class="sr-only">Delete</span>
|
|
|
|
</button>
|
2022-01-19 10:34:08 +03:00
|
|
|
{{/if}}
|