format some currency
This commit is contained in:
parent
bec2d57920
commit
5fe08c110f
|
@ -1,3 +1,5 @@
|
|||
|
||||
// TODO: typo in this helper name: currency not curency.
|
||||
export default Ember.Helper.helper(function(params) {
|
||||
let currencySign;
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
export default Ember.Helper.helper(function(params) {
|
||||
let currencySign;
|
||||
|
||||
switch (Discourse.SiteSettings.discourse_patrons_currency) {
|
||||
case "EUR":
|
||||
currencySign = "€";
|
||||
break;
|
||||
case "GBP":
|
||||
currencySign = "£";
|
||||
break;
|
||||
default:
|
||||
currencySign = "$";
|
||||
}
|
||||
|
||||
|
||||
|
||||
return currencySign + params.map(p => p.toUpperCase()).join(' ');
|
||||
});
|
|
@ -45,7 +45,7 @@
|
|||
<td>{{format-date plan.createdFormatted}}</td>
|
||||
<td>{{plan.metadata.group_name}}</td>
|
||||
<td>{{plan.active}}</td>
|
||||
<td class="td-right">{{plan.amountDollars}}</td>
|
||||
<td class="td-right">{{format-currency plan.currency plan.amountDollars}}</td>
|
||||
<td class="td-right">
|
||||
{{#link-to "adminPlugins.discourse-patrons.products.show.plans.show" model.product.id plan.id class="btn no-text btn-icon"}}
|
||||
{{d-icon "far-edit"}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
en:
|
||||
site_settings:
|
||||
discourse_patrons_enabled: "Enable the Discourse Patrons plugin."
|
||||
discourse_patrons_secret_key: "Stripe Secret Key"
|
||||
discourse_patrons_public_key: "Stripe Public Key"
|
||||
discourse_patrons_secret_key: Stripe Secret Key
|
||||
discourse_patrons_public_key: Stripe Public Key
|
||||
discourse_patrons_subscription_group: The name of the group the user is added to when successfully subscribed
|
||||
discourse_patrons_currency: "Currency Code"
|
||||
discourse_patrons_currency: Default Currency Code. This can be overridden when creating a subscription plan
|
||||
discourse_patrons_zip_code: "Show Zip Code"
|
||||
discourse_patrons_billing_address: "Collect billing address"
|
||||
discourse_patrons_payment_page: "Text to be added to enter payments page. Markdown is supported."
|
||||
|
|
Loading…
Reference in New Issue