various
This commit is contained in:
parent
1b1eb215e4
commit
0260197e9e
|
@ -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
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label" for="card-element">
|
||||
{{i18n 'discourse_donations.amount'}}
|
||||
{{settings.discourse_donations_currency}}
|
||||
{{siteSettings.discourse_donations_currency}}
|
||||
</label>
|
||||
<div class="controls controls-dropdown">
|
||||
{{combo-box valueAttribute="value" content=donateAmounts value=amount}}
|
||||
|
@ -22,7 +22,7 @@
|
|||
<div class="control-group">
|
||||
<div class="controls">
|
||||
{{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'}}>
|
||||
{{d-icon 'info-circle'}}
|
||||
{{#if showTransactionFeeDescription}}
|
||||
|
@ -39,7 +39,7 @@
|
|||
{{i18n 'discourse_donations.transaction_fee.total'}}
|
||||
</label>
|
||||
<div class="controls">
|
||||
{{settings.discourse_donations_currency}}
|
||||
{{siteSettings.discourse_donations_currency}}
|
||||
{{totalAmount}}
|
||||
{{period}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue