the form submits but an ajax error happens
This commit is contained in:
parent
02c9ea873a
commit
df1d5a3181
|
@ -3,9 +3,11 @@ import { ajax } from "discourse/lib/ajax";
|
|||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
stripePaymentHandler(paymentMethodId, amount) {
|
||||
return ajax("/donate/charges", {
|
||||
return ajax("/patrons", {
|
||||
data: { paymentMethodId, amount },
|
||||
method: "post"
|
||||
}).catch(() => {
|
||||
return { error: 'An error occured while submitting the form.' };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
<h3>{{i18n 'discourse_donations.title' site_name=siteSettings.title}}</h3>
|
||||
<h3>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h3>
|
||||
|
||||
<div class="donations-page-description">
|
||||
{{cook-text siteSettings.discourse_donations_page_description}}
|
||||
{{cook-text siteSettings.discourse_patrons_page_description}}
|
||||
</div>
|
||||
|
||||
<div class="donations-page-payment">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.discourse-donations-section-columns {
|
||||
.discourse-patrons-section-columns {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.discourse-donations-section-columns {
|
||||
.discourse-patrons-section-columns {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
border: 1px $primary-low-mid solid;
|
||||
|
@ -48,7 +48,7 @@
|
|||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.discourse-donations-confirmation {
|
||||
.discourse-patrons-confirmation {
|
||||
width: 100%;
|
||||
|
||||
td {
|
||||
|
|
Loading…
Reference in New Issue