From 0260197e9ee3cd53195d4fdcdcceaa8087a5d348 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 28 Jun 2018 13:46:02 +1000 Subject: [PATCH] various --- .../javascripts/discourse/components/stripe-card.js.es6 | 8 ++++---- .../discourse/templates/components/stripe-card.hbs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/javascripts/discourse/components/stripe-card.js.es6 b/assets/javascripts/discourse/components/stripe-card.js.es6 index 06d4ad3..2708ca1 100644 --- a/assets/javascripts/discourse/components/stripe-card.js.es6 +++ b/assets/javascripts/discourse/components/stripe-card.js.es6 @@ -1,5 +1,4 @@ import { ajax } from 'discourse/lib/ajax'; -import { getRegister } from 'discourse-common/lib/get-owner'; import { formatAnchor, zeroDecimalCurrencies } from '../lib/donation-utilities'; import { default as computed } from 'ember-addons/ember-computed-decorators'; import { emailValid } from "discourse/lib/utilities"; @@ -10,6 +9,7 @@ export default Ember.Component.extend({ transactionInProgress: null, settings: null, showTransactionFeeDescription: false, + includeTransactionFee: true, init() { this._super(); @@ -35,8 +35,8 @@ export default Ember.Component.extend({ return { id: type, name: I18n.t(`discourse_donations.types.${type}`) - } - }) + }; + }); }, @computed('type') @@ -192,7 +192,7 @@ export default Ember.Component.extend({ ajax('/donate/charges', { data: params, method: 'post' - }).then(result => { + }).then(result => { if (result.subscription) { let subscription = $.extend({}, result.subscription, { new: true diff --git a/assets/javascripts/discourse/templates/components/stripe-card.hbs b/assets/javascripts/discourse/templates/components/stripe-card.hbs index 154a746..e8ff719 100644 --- a/assets/javascripts/discourse/templates/components/stripe-card.hbs +++ b/assets/javascripts/discourse/templates/components/stripe-card.hbs @@ -11,7 +11,7 @@
{{combo-box valueAttribute="value" content=donateAmounts value=amount}} @@ -22,7 +22,7 @@
{{input type="checkbox" checked=includeTransactionFee}} - {{i18n 'discourse_donations.transaction_fee.label' transactionFee=transactionFee currency=settings.discourse_donations_currency}} + {{i18n 'discourse_donations.transaction_fee.label' transactionFee=transactionFee currency=siteSettings.discourse_donations_currency}}
{{d-icon 'info-circle'}} {{#if showTransactionFeeDescription}} @@ -39,7 +39,7 @@ {{i18n 'discourse_donations.transaction_fee.total'}}
- {{settings.discourse_donations_currency}} + {{siteSettings.discourse_donations_currency}} {{totalAmount}} {{period}}