add controllers
This commit is contained in:
parent
a9434f5723
commit
5cddda6703
|
@ -0,0 +1,12 @@
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
stripePaymentHandler(paymentMethodId, amount) {
|
||||
return ajax("/donate/charges", {
|
||||
data: { paymentMethodId, amount },
|
||||
method: "post"
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
|
||||
});
|
|
@ -1,2 +1,12 @@
|
|||
|
||||
index
|
||||
<h3>{{i18n 'discourse_donations.title' site_name=siteSettings.title}}</h3>
|
||||
|
||||
<div class="donations-page-description">
|
||||
{{cook-text siteSettings.discourse_donations_page_description}}
|
||||
</div>
|
||||
|
||||
<div class="donations-page-payment">
|
||||
{{donation-form
|
||||
stripePaymentHandler=(action "stripePaymentHandler")
|
||||
}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue