2021-02-02 15:55:42 +03:00
|
|
|
<div class="gh-launch-wizard-settings-container">
|
2021-02-04 17:02:48 +03:00
|
|
|
<div class="gh-stack overflow-scroll flex-grow-1">
|
2021-02-02 15:55:42 +03:00
|
|
|
<div class="gh-stack-item flex-column">
|
|
|
|
<div class="w-100">
|
|
|
|
<GhFormGroup @class="for-select">
|
|
|
|
<div class="gh-setting-title" for="currency">Plan currency</div>
|
|
|
|
<span class="gh-select mt2">
|
|
|
|
<OneWaySelect
|
|
|
|
@value={{this.selectedCurrency}}
|
|
|
|
id="currency"
|
|
|
|
name="currency"
|
|
|
|
@options={{this.currencies}}
|
|
|
|
@optionValuePath="value"
|
|
|
|
@optionLabelPath="label"
|
|
|
|
@update={{this.setStripePlansCurrency}}
|
|
|
|
/>
|
|
|
|
{{svg-jar "arrow-down-small"}}
|
|
|
|
</span>
|
|
|
|
</GhFormGroup>
|
|
|
|
</div>
|
|
|
|
<div class="w-100 flex flex-column flex-row-ns">
|
|
|
|
<div class="w-100 w-50-ns mr3-ns">
|
|
|
|
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="stripePlans">
|
|
|
|
<div class="gh-setting-title">Monthly price</div>
|
2021-01-21 12:20:06 +03:00
|
|
|
|
2021-02-02 15:55:42 +03:00
|
|
|
<div class="flex items-center justify-center mt2 gh-input-group gh-labs-price-label">
|
|
|
|
<GhTextInput
|
|
|
|
@value={{readonly this.stripePlans.monthly.amount}}
|
|
|
|
@type="number"
|
|
|
|
@input={{action (mut this.stripeMonthlyAmount) value="target.value"}}
|
|
|
|
{{on "blur" this.validateStripePlans}}
|
|
|
|
/>
|
|
|
|
<span class="gh-input-append"><span class="ttu">{{this.stripePlans.monthly.currency}}</span>/month</span>
|
|
|
|
</div>
|
|
|
|
</GhFormGroup>
|
|
|
|
</div>
|
|
|
|
<div class="w-100 w-50-ns ml2-ns">
|
|
|
|
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="stripePlans">
|
|
|
|
<div class="gh-setting-title">Yearly price</div>
|
|
|
|
<div class="flex items-center justify-center mt2 gh-input-group gh-labs-price-label">
|
|
|
|
<GhTextInput
|
|
|
|
@value={{readonly this.stripePlans.yearly.amount}}
|
|
|
|
@type="number"
|
|
|
|
@input={{action (mut this.stripeYearlyAmount) value="target.value"}}
|
|
|
|
{{on "blur" this.validateStripePlans}}
|
|
|
|
/>
|
|
|
|
<span class="gh-input-append"><span class="ttu">{{this.stripePlans.yearly.currency}}</span>/year</span>
|
|
|
|
</div>
|
|
|
|
</GhFormGroup>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-21 12:20:06 +03:00
|
|
|
</div>
|
2021-02-02 15:55:42 +03:00
|
|
|
<div class="w-100 w-50-l flex flex-column flex-row-ns">
|
|
|
|
<GhErrorMessage @errors={{this.settings.errors}} @property="stripePlans" class="w-100 red"/>
|
2021-01-21 12:20:06 +03:00
|
|
|
</div>
|
|
|
|
|
2021-02-04 17:02:48 +03:00
|
|
|
<div class="gh-stack-item gh-setting flex-column">
|
2021-02-02 15:55:42 +03:00
|
|
|
<div class="gh-setting-title">Plans available at signup</div>
|
|
|
|
<div class="form-group mt2 mb0 for-checkbox">
|
|
|
|
<label
|
|
|
|
class="checkbox"
|
|
|
|
for="free-plan"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
checked={{this.isFreeChecked}}
|
|
|
|
id="free-plan"
|
|
|
|
name="free-plan"
|
|
|
|
disabled={{not this.settings.membersAllowFreeSignup}}
|
|
|
|
class="gh-input post-settings-featured"
|
|
|
|
{{on "click" this.toggleFreePlan}}
|
|
|
|
data-test-checkbox="featured"
|
|
|
|
>
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>Free</p>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group mb0 for-checkbox">
|
|
|
|
<label
|
|
|
|
class="checkbox"
|
|
|
|
for="monthly-plan"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
id="monthly-plan"
|
|
|
|
name="monthly-plan"
|
|
|
|
checked={{this.isMonthlyChecked}}
|
|
|
|
disabled={{not this.membersUtils.isStripeEnabled}}
|
|
|
|
class="gh-input post-settings-featured"
|
|
|
|
{{on "click" this.toggleMonthlyPlan}}
|
|
|
|
data-test-checkbox="featured"
|
|
|
|
>
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>Monthly</p>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group mb0 for-checkbox">
|
|
|
|
<label
|
|
|
|
class="checkbox"
|
|
|
|
for="yearly-plan"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
id="yearly-plan"
|
|
|
|
name="yearly-plan"
|
|
|
|
checked={{this.isYearlyChecked}}
|
|
|
|
disabled={{not this.membersUtils.isStripeEnabled}}
|
|
|
|
class="gh-input post-settings-featured"
|
|
|
|
{{on "click" this.toggleYearlyPlan}}
|
|
|
|
data-test-checkbox="featured"
|
|
|
|
>
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>Yearly</p>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-04 17:02:48 +03:00
|
|
|
</div>
|
2021-01-21 12:20:06 +03:00
|
|
|
|
2021-02-04 17:02:48 +03:00
|
|
|
<div class="gh-launch-wizard-nav-buttons">
|
|
|
|
<button type="button" class="gh-btn gh-btn-icon gh-btn-large mr2" {{on "click" @backStep}}><span>{{svg-jar "arrow-left"}}</span></button>
|
2021-01-28 17:25:05 +03:00
|
|
|
|
2021-02-04 17:02:48 +03:00
|
|
|
{{!-- TODO: reset "failed" state automatically --}}
|
|
|
|
<GhTaskButton
|
|
|
|
@buttonText="Save and continue"
|
|
|
|
@task={{this.saveAndContinue}}
|
|
|
|
@runningText="Launching"
|
|
|
|
@class="right gh-btn gh-btn-black gh-btn-large gh-btn-icon"
|
|
|
|
data-test-button="wizard-next"
|
|
|
|
/>
|
2021-02-02 15:55:42 +03:00
|
|
|
</div>
|
2021-01-28 17:25:05 +03:00
|
|
|
</div>
|