discourse-subscriptions/assets/javascripts/discourse/templates/subscribe/show.hbs

61 lines
1.4 KiB
Handlebars
Raw Normal View History

2019-12-15 21:59:58 -05:00
<div class="discourse-subscriptions-section-columns">
2019-12-17 16:47:01 -05:00
<div class="section-column discourse-subscriptions-confirmation-billing">
2019-11-04 00:37:21 -05:00
<h2>
{{model.product.name}}
</h2>
2019-12-17 05:14:13 -05:00
<hr>
2019-11-04 00:37:21 -05:00
<p>
{{html-safe model.product.description}}
2019-11-04 00:37:21 -05:00
</p>
</div>
2019-11-04 00:37:21 -05:00
<div class="section-column">
{{#if canPurchase}}
2019-11-28 23:08:51 -05:00
<h2>
{{i18n "discourse_subscriptions.subscribe.card.title"}}
2019-11-28 23:08:51 -05:00
</h2>
2019-11-04 00:37:21 -05:00
2019-12-17 05:14:13 -05:00
<hr>
{{payment-options plans=model.plans selectedPlan=selectedPlan}}
2019-12-05 21:52:03 -05:00
<hr>
{{subscribe-card cardElement=cardElement}}
2019-11-28 04:11:48 -05:00
{{#if loading}}
{{loading-spinner}}
{{else if isAnonymous}}
{{login-required}}
2019-11-28 23:08:51 -05:00
{{else}}
{{input
type="text"
name="promo_code"
placeholder=(i18n "discourse_subscriptions.subscribe.promo_code")
value=promoCode
class="subscribe-promo-code"
}}
{{d-button
2019-11-28 23:08:51 -05:00
disabled=loading
2022-07-05 19:20:12 -04:00
action=(action "stripePaymentHandler")
class="btn btn-primary btn-payment"
label="discourse_subscriptions.plans.payment_button"
}}
2019-11-28 04:11:48 -05:00
{{/if}}
{{else}}
<h2>{{i18n "discourse_subscriptions.subscribe.already_purchased"}}</h2>
{{#link-to
"user.billing.subscriptions"
currentUser.username
class="btn btn-primary"
}}
{{i18n "discourse_subscriptions.subscribe.go_to_billing"}}
{{/link-to}}
{{/if}}
2019-11-04 00:37:21 -05:00
</div>
</div>