2021-04-09 14:00:41 +03:00
|
|
|
<header class="modal-header" data-test-modal="webhook-form">
|
2021-04-22 19:47:19 +03:00
|
|
|
<h1 data-test-text="title">{{this.title}}</h1>
|
2021-04-09 14:00:41 +03:00
|
|
|
</header>
|
2022-02-02 19:09:43 +03:00
|
|
|
<button class="close" href title="Close" type="button" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
|
2021-04-09 14:00:41 +03:00
|
|
|
{{svg-jar "close"}}
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<form>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="gh-main-section-block">
|
|
|
|
<div class="gh-main-section-content grey gh-product-priceform-block">
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhFormGroup @errors={{this.errors}} @property="name">
|
2021-04-09 14:00:41 +03:00
|
|
|
<label for="name" class="fw6">Name</label>
|
|
|
|
<GhTextInput
|
2021-04-26 21:22:04 +03:00
|
|
|
@value={{readonly this.price.nickname}}
|
|
|
|
@input={{action (mut this.price.nickname) value="target.value"}}
|
2021-04-09 14:00:41 +03:00
|
|
|
@name="name"
|
|
|
|
@id="name"
|
|
|
|
@class="gh-input" />
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhErrorMessage @errors={{this.errors}} @property="name" />
|
2021-04-09 14:00:41 +03:00
|
|
|
</GhFormGroup>
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhFormGroup @errors={{this.errors}} @property="description">
|
2021-04-09 14:00:41 +03:00
|
|
|
<label for="description" class="fw6">Description</label>
|
|
|
|
<GhTextInput
|
2021-05-05 11:49:56 +03:00
|
|
|
@value={{readonly this.price.description}}
|
|
|
|
@input={{action (mut this.price.description) value="target.value"}}
|
2021-04-09 14:00:41 +03:00
|
|
|
@name="description"
|
|
|
|
@id="description"
|
|
|
|
@class="gh-input" />
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhErrorMessage @errors={{this.errors}} @property="description" />
|
2021-04-09 14:00:41 +03:00
|
|
|
</GhFormGroup>
|
2021-05-05 11:49:56 +03:00
|
|
|
<div class="gh-product-priceform-pricecurrency">
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhFormGroup @errors={{this.errors}} @property="amount">
|
|
|
|
<label for="amount" class="fw6">Price</label>
|
2021-04-26 21:42:16 +03:00
|
|
|
<div class="flex items-center justify-center gh-labs-price-label">
|
2021-04-09 14:00:41 +03:00
|
|
|
<GhTextInput
|
2021-05-10 18:29:05 +03:00
|
|
|
@id="amount"
|
2021-04-22 19:47:19 +03:00
|
|
|
@value={{this.price.amount}}
|
2021-04-09 14:00:41 +03:00
|
|
|
@type="number"
|
2021-04-22 19:47:19 +03:00
|
|
|
@disabled={{this.isExistingPrice}}
|
2021-04-26 21:22:04 +03:00
|
|
|
@input={{action "setAmount" value="target.value"}}
|
2021-04-09 14:00:41 +03:00
|
|
|
/>
|
|
|
|
</div>
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhErrorMessage @errors={{this.errors}} @property="amount" />
|
2021-04-09 14:00:41 +03:00
|
|
|
</GhFormGroup>
|
2021-04-26 21:42:16 +03:00
|
|
|
<GhFormGroup @class="for-select">
|
|
|
|
<label class="fw6 f8"for="currency">Plan currency</label>
|
|
|
|
<span class="gh-select mt1">
|
|
|
|
{{one-way-select this.selectedCurrencyObj
|
|
|
|
id="currency"
|
|
|
|
name="currency"
|
|
|
|
options=(readonly this.allCurrencies)
|
|
|
|
optionValuePath="value"
|
|
|
|
optionLabelPath="label"
|
|
|
|
disabled=this.isExistingPrice
|
|
|
|
update=(action "setCurrency")
|
|
|
|
}}
|
|
|
|
{{svg-jar "arrow-down-small"}}
|
|
|
|
</span>
|
|
|
|
</GhFormGroup>
|
2021-04-09 14:00:41 +03:00
|
|
|
</div>
|
2021-04-26 21:42:16 +03:00
|
|
|
<GhFormGroup @errors={{this.price.errors}} @hasValidated={{this.price.hasValidated}} @property="billing-period">
|
|
|
|
<label for="billing-period" class="fw6">Billing period</label>
|
2021-05-05 11:49:56 +03:00
|
|
|
<GhProductsPriceBillingperiod
|
2021-04-26 21:42:16 +03:00
|
|
|
@updatePeriod={{action "updatePeriod"}}
|
2021-05-05 11:49:56 +03:00
|
|
|
@triggerId="period-input"
|
|
|
|
@value={{this.price.interval}} @disabled={{this.isExistingPrice}}
|
2021-04-26 21:42:16 +03:00
|
|
|
/>
|
2021-05-10 18:29:05 +03:00
|
|
|
<GhErrorMessage @errors={{this.errors}} @property="interval" />
|
2021-04-26 21:42:16 +03:00
|
|
|
</GhFormGroup>
|
2021-04-09 14:00:41 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button
|
2022-02-02 19:09:43 +03:00
|
|
|
class="gh-btn" data-test-button="cancel-webhook" type="button" {{action "closeModal"}}
|
2021-04-09 14:00:41 +03:00
|
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
|
|
{{action (optional this.noop) on="mouseDown"}}
|
|
|
|
>
|
|
|
|
<span>Cancel</span>
|
|
|
|
</button>
|
2021-05-06 18:11:09 +03:00
|
|
|
<GhTaskButton @buttonText="Save"
|
2021-04-09 14:00:41 +03:00
|
|
|
@successText={{this.successText}}
|
2021-04-26 21:22:04 +03:00
|
|
|
@task={{this.savePrice}}
|
2021-04-09 14:00:41 +03:00
|
|
|
@class="gh-btn gh-btn-black gh-btn-icon"
|
2021-04-26 21:22:04 +03:00
|
|
|
data-test-button="save-price" />
|
2021-04-09 14:00:41 +03:00
|
|
|
</div>
|