diff --git a/assets/javascripts/discourse/components/ds-button.js b/assets/javascripts/discourse/components/ds-button.js deleted file mode 100644 index cf27b9e..0000000 --- a/assets/javascripts/discourse/components/ds-button.js +++ /dev/null @@ -1,12 +0,0 @@ -import Button from "discourse/components/d-button"; - -export default Button.extend({ - seleted: false, - - init() { - this._super(...arguments); - this.classNameBindings = this.classNameBindings.concat( - "selected:btn-primary" - ); - }, -}); diff --git a/assets/javascripts/discourse/components/payment-plan.js b/assets/javascripts/discourse/components/payment-plan.js index 5122de4..5bc138d 100644 --- a/assets/javascripts/discourse/components/payment-plan.js +++ b/assets/javascripts/discourse/components/payment-plan.js @@ -5,8 +5,8 @@ const RECURRING = "recurring"; export default Component.extend({ @discourseComputed("selectedPlan") - selected(planId) { - return planId === this.plan.id; + selectedClass(planId) { + return planId === this.plan.id ? "btn-primary" : ""; }, @discourseComputed("plan.type") diff --git a/assets/javascripts/discourse/templates/components/payment-plan.hbs b/assets/javascripts/discourse/templates/components/payment-plan.hbs index 559f3b8..e79afd8 100644 --- a/assets/javascripts/discourse/templates/components/payment-plan.hbs +++ b/assets/javascripts/discourse/templates/components/payment-plan.hbs @@ -1,14 +1,11 @@ -{{#ds-button - action=(action "planClick") - selected=selected - class="btn-discourse-subscriptions-subscribe" -}} +
- {{#if recurringPlan}} + {{#if this.recurringPlan}} {{i18n (concat "discourse_subscriptions.plans.interval.adverb." - plan.recurring.interval + this.plan.recurring.interval ) }} {{else}} @@ -17,6 +14,6 @@
- {{format-currency plan.currency plan.amountDollars}} + {{format-currency this.plan.currency this.plan.amountDollars}} -{{/ds-button}} +