mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-08 20:54:40 +00:00
add billing to confirm dialog
This commit is contained in:
parent
926aee79bb
commit
22af03a42e
@ -41,8 +41,7 @@ Many thanks to Chris Beach and Angus McLeod who helped on the previous version o
|
|||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
* Add a description/message
|
* Add a description/message
|
||||||
* Check against other themes
|
* Check against other themes (works ok with light and dark)
|
||||||
* Add billing info to confirm dialog
|
|
||||||
* Validate the model properly. Not in the stripe component
|
* Validate the model properly. Not in the stripe component
|
||||||
* Show the transaction on the thank you page.
|
* Show the transaction on the thank you page.
|
||||||
* Work out where to put the helper tests. Name collision!
|
* Work out where to put the helper tests. Name collision!
|
||||||
|
@ -2,17 +2,36 @@
|
|||||||
{{#if confirmation}}
|
{{#if confirmation}}
|
||||||
{{#d-modal closeModal=(action "closeModal") modalStyle="inline-modal" title=(i18n "discourse_patrons.payment.payment_confirmation")}}
|
{{#d-modal closeModal=(action "closeModal") modalStyle="inline-modal" title=(i18n "discourse_patrons.payment.payment_confirmation")}}
|
||||||
{{#d-modal-body}}
|
{{#d-modal-body}}
|
||||||
<table class="discourse-patrons-confirmation">
|
<div class="discourse-patrons-section-columns">
|
||||||
<tr>
|
<div class="section-column">
|
||||||
<td>{{i18n 'discourse_patrons.confirmation.amount'}}</td>
|
<table class="discourse-patrons-confirmation">
|
||||||
<td class="discourse-donations-amount">{{format-curency amount}}</td>
|
<tr>
|
||||||
</tr>
|
<td>{{i18n 'discourse_patrons.billing.name'}}</td>
|
||||||
<tr>
|
<td>{{billing.email}}</td>
|
||||||
<td>{{i18n 'discourse_patrons.confirmation.last4'}}</td>
|
</tr>
|
||||||
<td class="discourse-patrons-last4">.... .... .... {{last4}}</td>
|
<tr>
|
||||||
</tr>
|
<td>{{i18n 'discourse_patrons.billing.email'}}</td>
|
||||||
</table>
|
<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>
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class='modal-footer'>
|
<div class='modal-footer'>
|
||||||
@ -30,7 +49,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="discourse-patrons-section-columns">
|
<div class="discourse-patrons-section-columns discourse-patrons-payment-details">
|
||||||
<div class="section-column">
|
<div class="section-column">
|
||||||
<h3>{{i18n 'discourse_patrons.payment.your_information'}}</h3>
|
<h3>{{i18n 'discourse_patrons.payment.your_information'}}</h3>
|
||||||
|
|
||||||
|
@ -47,11 +47,14 @@
|
|||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discourse-patrons-payment-details {
|
||||||
|
border: 1px $primary-low-mid solid;
|
||||||
|
background-color: $primary-low;
|
||||||
|
}
|
||||||
|
|
||||||
.discourse-patrons-section-columns {
|
.discourse-patrons-section-columns {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border: 1px $primary-low-mid solid;
|
|
||||||
background-color: $primary-low;
|
|
||||||
|
|
||||||
.discourse-patrons-billing {
|
.discourse-patrons-billing {
|
||||||
.ember-text-field {
|
.ember-text-field {
|
||||||
|
@ -3,7 +3,7 @@ import componentTest from "helpers/component-test";
|
|||||||
moduleForComponent("stripe-card", { integration: true });
|
moduleForComponent("stripe-card", { integration: true });
|
||||||
|
|
||||||
componentTest("Discourse Patrons stripe card success", {
|
componentTest("Discourse Patrons stripe card success", {
|
||||||
template: `{{stripe-card handleConfirmStripeCard=onSubmit}}`,
|
template: `{{stripe-card handleConfirmStripeCard=onSubmit billing=billing}}`,
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
window.Stripe = () => {
|
window.Stripe = () => {
|
||||||
@ -26,6 +26,15 @@ componentTest("Discourse Patrons stripe card success", {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.set(
|
||||||
|
"billing",
|
||||||
|
Ember.Object.create({
|
||||||
|
name: "",
|
||||||
|
email: "",
|
||||||
|
phone: ""
|
||||||
|
})
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user