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

61 lines
1.4 KiB
Handlebars

<div class="discourse-subscriptions-section-columns">
<div class="section-column discourse-subscriptions-confirmation-billing">
<h2>
{{model.product.name}}
</h2>
<hr>
<p>
{{html-safe model.product.description}}
</p>
</div>
<div class="section-column">
{{#if canPurchase}}
<h2>
{{i18n "discourse_subscriptions.subscribe.card.title"}}
</h2>
<hr>
{{payment-options plans=model.plans selectedPlan=selectedPlan}}
<hr>
{{subscribe-card cardElement=cardElement}}
{{#if loading}}
{{loading-spinner}}
{{else if isAnonymous}}
{{login-required}}
{{else}}
{{input
type="text"
name="promo_code"
placeholder=(i18n "discourse_subscriptions.subscribe.promo_code")
value=promoCode
class="subscribe-promo-code"
}}
{{d-button
disabled=loading
action=(action "stripePaymentHandler")
class="btn btn-primary btn-payment"
label="discourse_subscriptions.plans.payment_button"
}}
{{/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}}
</div>
</div>