This commit is contained in:
Angus McLeod 2018-06-28 13:46:02 +10:00
parent 1b1eb215e4
commit 0260197e9e
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,4 @@
import { ajax } from 'discourse/lib/ajax'; import { ajax } from 'discourse/lib/ajax';
import { getRegister } from 'discourse-common/lib/get-owner';
import { formatAnchor, zeroDecimalCurrencies } from '../lib/donation-utilities'; import { formatAnchor, zeroDecimalCurrencies } from '../lib/donation-utilities';
import { default as computed } from 'ember-addons/ember-computed-decorators'; import { default as computed } from 'ember-addons/ember-computed-decorators';
import { emailValid } from "discourse/lib/utilities"; import { emailValid } from "discourse/lib/utilities";
@ -10,6 +9,7 @@ export default Ember.Component.extend({
transactionInProgress: null, transactionInProgress: null,
settings: null, settings: null,
showTransactionFeeDescription: false, showTransactionFeeDescription: false,
includeTransactionFee: true,
init() { init() {
this._super(); this._super();
@ -35,8 +35,8 @@ export default Ember.Component.extend({
return { return {
id: type, id: type,
name: I18n.t(`discourse_donations.types.${type}`) name: I18n.t(`discourse_donations.types.${type}`)
} };
}) });
}, },
@computed('type') @computed('type')

View File

@ -11,7 +11,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="card-element"> <label class="control-label" for="card-element">
{{i18n 'discourse_donations.amount'}} {{i18n 'discourse_donations.amount'}}
{{settings.discourse_donations_currency}} {{siteSettings.discourse_donations_currency}}
</label> </label>
<div class="controls controls-dropdown"> <div class="controls controls-dropdown">
{{combo-box valueAttribute="value" content=donateAmounts value=amount}} {{combo-box valueAttribute="value" content=donateAmounts value=amount}}
@ -22,7 +22,7 @@
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
{{input type="checkbox" checked=includeTransactionFee}} {{input type="checkbox" checked=includeTransactionFee}}
<span>{{i18n 'discourse_donations.transaction_fee.label' transactionFee=transactionFee currency=settings.discourse_donations_currency}}</span> <span>{{i18n 'discourse_donations.transaction_fee.label' transactionFee=transactionFee currency=siteSettings.discourse_donations_currency}}</span>
<div class='transaction-fee-description' {{action 'toggleTransactionFeeDescription'}}> <div class='transaction-fee-description' {{action 'toggleTransactionFeeDescription'}}>
{{d-icon 'info-circle'}} {{d-icon 'info-circle'}}
{{#if showTransactionFeeDescription}} {{#if showTransactionFeeDescription}}
@ -39,7 +39,7 @@
{{i18n 'discourse_donations.transaction_fee.total'}} {{i18n 'discourse_donations.transaction_fee.total'}}
</label> </label>
<div class="controls"> <div class="controls">
{{settings.discourse_donations_currency}} {{siteSettings.discourse_donations_currency}}
{{totalAmount}} {{totalAmount}}
{{period}} {{period}}
</div> </div>