fix client/server messages and locales
zip code should be a positive boolean not negative remove dollar signs fix stripe.rb method signature and charging logic
This commit is contained in:
@@ -3,12 +3,12 @@ import { getRegister } from 'discourse-common/lib/get-owner';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
donateAmounts: [
|
||||
{ value: 1, name: '$1.00'},
|
||||
{ value: 2, name: '$2.00'},
|
||||
{ value: 5, name: '$5.00'},
|
||||
{ value: 10, name: '$10.00'},
|
||||
{ value: 20, name: '$20.00'},
|
||||
{ value: 50, name: '$50.00'}
|
||||
{ value: 1, name: '1.00'},
|
||||
{ value: 2, name: '2.00'},
|
||||
{ value: 5, name: '5.00'},
|
||||
{ value: 10, name: '10.00'},
|
||||
{ value: 20, name: '20.00'},
|
||||
{ value: 50, name: '50.00'}
|
||||
],
|
||||
result: [],
|
||||
amount: null,
|
||||
@@ -27,7 +27,7 @@ export default Ember.Component.extend({
|
||||
card: function() {
|
||||
let elements = this.get('stripe').elements();
|
||||
return elements.create('card', {
|
||||
hidePostalCode: this.get('settings').discourse_donations_hide_zip_code
|
||||
hidePostalCode: !this.get('settings').discourse_donations_zip_code
|
||||
});
|
||||
}.property('stripe'),
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ function validationErrors(tagInfo, content, siteSettings) {
|
||||
if (!siteSettings.discourse_donations_public_key) { errors.push("missing key (site setting)"); }
|
||||
if (!siteSettings.discourse_donations_currency) { errors.push("missing currency (site setting)"); }
|
||||
if (!siteSettings.discourse_donations_shop_name) { errors.push("missing name (site setting)"); }
|
||||
if (!siteSettings.discourse_donations_hide_zip_code) { errors.push("missing zip code toggle (site setting)"); }
|
||||
if (!siteSettings.discourse_donations_zip_code) { errors.push("missing zip code toggle (site setting)"); }
|
||||
if (!siteSettings.discourse_donations_billing_address) { errors.push("missing billing address toggle (site setting)"); }
|
||||
if (!tagInfo.attrs['amount']) { errors.push("missing amount"); }
|
||||
if (!content) { errors.push("missing description"); }
|
||||
@@ -47,7 +47,7 @@ function insertCheckout(state, tagInfo, content, siteSettings) {
|
||||
['data-description', content],
|
||||
['data-image', tagInfo.attrs['image'] || ''],
|
||||
['data-locale', 'auto'],
|
||||
['data-zip-code', !siteSettings.discourse_donations_hide_zip_code],
|
||||
['data-zip-code', siteSettings.discourse_donations_zip_code],
|
||||
['data-billing-address', siteSettings.discourse_donations_billing_address],
|
||||
['data-currency', siteSettings.discourse_donations_currency]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user