fix i18n and import site settings

This commit is contained in:
Rimian Perkins 2017-02-28 12:39:07 +11:00
parent b6a4d5dc8e
commit 10e63f2a4c
4 changed files with 11 additions and 9 deletions

View File

@ -1,13 +1,17 @@
import { ajax } from 'discourse/lib/ajax'; import { ajax } from 'discourse/lib/ajax';
import { getRegister } from 'discourse-common/lib/get-owner';
export default Ember.Component.extend({ export default Ember.Component.extend({
donateAmounts: [1, 5, 10, 25],
result: null, result: null,
donateAmounts: [5, 10],
amount: null, amount: null,
stripe: null,
stripe: function() { init() {
return Stripe(Discourse.discourse_donations_public_key); this._super();
}.property('stripe'), var public_key = getRegister(this).lookup('site-settings:main').discourse_donations_public_key
this.set('stripe', Stripe(public_key));
},
card: function() { card: function() {
var elements = this.get('stripe').elements(); var elements = this.get('stripe').elements();

View File

@ -6,5 +6,3 @@ en:
card: Kreditkarte oder Bankkarte card: Kreditkarte oder Bankkarte
success: Bezahlung erfolgreich ! success: Bezahlung erfolgreich !
submit: Spende bezahlen submit: Spende bezahlen
secret_key: Secret Key
public_key: Public Key

View File

@ -6,5 +6,3 @@ en:
card: Credit or debit card card: Credit or debit card
success: Payment Successful! success: Payment Successful!
submit: Make Payment submit: Make Payment
secret_key: Secret Key
public_key: Public Key

View File

@ -1,3 +1,5 @@
en: en:
site_settings: site_settings:
discourse_donations_enabled: "Enable the discourse donations plugin." discourse_donations_enabled: Enable the discourse donations plugin.
discourse_donations_secret_key: Stripe Secret Key
discourse_donations_public_key: Stripe Public Key