discourse-subscriptions/assets/javascripts/discourse/templates/components/donation-form.hbs

111 lines
3.7 KiB
Handlebars
Raw Normal View History

2019-09-11 06:19:50 -04:00
{{#if confirmation}}
2019-09-12 04:27:25 -04:00
{{#d-modal closeModal=(action "closeModal") modalStyle="inline-modal" title=(i18n "discourse_patrons.payment.payment_confirmation")}}
2019-09-11 06:19:50 -04:00
{{#d-modal-body}}
2019-09-12 04:51:40 -04:00
<div class="discourse-patrons-section-columns">
2019-09-12 05:04:10 -04:00
<div class="section-column discourse-patrons-confirmation-billing">
2019-09-12 04:51:40 -04:00
<table class="discourse-patrons-confirmation">
<tr>
<td>{{i18n 'discourse_patrons.billing.name'}}</td>
2019-09-14 03:56:37 -04:00
<td>{{billing.name}}</td>
2019-09-12 04:51:40 -04:00
</tr>
<tr>
<td>{{i18n 'discourse_patrons.billing.email'}}</td>
<td>{{billing.email}}</td>
</tr>
<tr>
<td>{{i18n 'discourse_patrons.billing.phone'}}</td>
<td>{{billing.phone}}</td>
</tr>
</table>
</div>
<div class="section-column">
<table class="discourse-patrons-confirmation">
<tr>
<td>{{i18n 'discourse_patrons.confirmation.amount'}}</td>
<td class="discourse-donations-amount">{{format-curency amount}}</td>
</tr>
<tr>
<td>{{i18n 'discourse_patrons.confirmation.last4'}}</td>
<td class="discourse-patrons-last4">.... .... .... {{last4}}</td>
</tr>
</table>
</div>
</div>
2019-09-11 06:19:50 -04:00
{{/d-modal-body}}
<div class='modal-footer'>
2019-09-12 02:16:38 -04:00
{{#d-button action="confirmStripeCard" class="btn btn-primary btn-payment btn-discourse-patrons"}}
2019-09-12 04:16:47 -04:00
{{i18n 'discourse_patrons.buttons.confirm_payment'}} {{format-curency amount}}
2019-09-11 06:19:50 -04:00
{{/d-button}}
</div>
{{/d-modal}}
{{#if paymentError}}
<div class="popup-tip bad">
{{paymentError}}
</div>
{{/if}}
{{else}}
2019-09-12 04:51:40 -04:00
<div class="discourse-patrons-section-columns discourse-patrons-payment-details">
2019-09-11 06:19:50 -04:00
<div class="section-column">
2019-10-24 20:13:14 -04:00
<h3>{{i18n 'discourse_patrons.one_time.payment.your_information'}}</h3>
2019-09-11 06:19:50 -04:00
2019-09-12 03:47:08 -04:00
<div class="user-controls discourse-patrons-fields discourse-patrons-billing">
2019-09-12 01:13:08 -04:00
<div class="display-row">
<div class="field">
{{i18n 'discourse_patrons.billing.name'}}
</div>
<div class="value">
{{input value=billing.name}}
2019-10-24 20:13:14 -04:00
<div class="desc">{{i18n 'discourse_patrons.one_time.payment.optional'}}</div>
2019-09-12 01:13:08 -04:00
</div>
</div>
<div class="display-row">
<div class="field">
{{i18n 'discourse_patrons.billing.email'}}
</div>
<div class="value">
2019-09-12 02:16:38 -04:00
{{input type="email" value=billing.email}}
2019-10-24 20:13:14 -04:00
<div class="desc">{{i18n 'discourse_patrons.one_time.payment.receipt_info'}}</div>
2019-09-12 01:13:08 -04:00
</div>
</div>
<div class="display-row">
<div class="field">
{{i18n 'discourse_patrons.billing.phone'}}
</div>
<div class="value">
{{input value=billing.phone}}
2019-10-24 20:13:14 -04:00
<div class="desc">{{i18n 'discourse_patrons.one_time.payment.optional'}}</div>
2019-09-12 01:13:08 -04:00
</div>
</div>
2019-09-11 06:19:50 -04:00
</div>
2019-09-12 01:13:08 -04:00
2019-09-11 06:19:50 -04:00
</div>
<div class="section-column">
2019-10-24 20:13:14 -04:00
<h3>{{i18n 'discourse_patrons.one_time.payment.payment_information'}}</h3>
2019-09-12 02:16:38 -04:00
2019-09-12 03:47:08 -04:00
<div class="user-controls discourse-patrons-fields">
2019-09-12 02:16:38 -04:00
<div class="display-row">
<div class="field">
2019-10-24 20:13:14 -04:00
{{i18n 'discourse_patrons.one_time.amount'}}
2019-09-12 02:16:38 -04:00
{{siteSettings.discourse_patrons_currency}}
</div>
<div class="value">
{{combo-box valueAttribute="value" content=amounts value=amount}}
</div>
</div>
2019-09-11 06:19:50 -04:00
</div>
2019-09-12 02:16:38 -04:00
{{stripe-card
amount=amount
currency=currency
billing=billing
handleConfirmStripeCard=(action "handleConfirmStripeCard")
}}
2019-09-11 06:19:50 -04:00
</div>
</div>
{{/if}}