From d60c5b6d54f0c0dcd1d91bcdb7b9b8576432eff5 Mon Sep 17 00:00:00 2001 From: Justin DiRose Date: Wed, 16 Sep 2020 09:49:45 -0500 Subject: [PATCH] UX: fix incorrect text on cancel button --- .../discourse/templates/user/billing/subscriptions.hbs | 6 +++++- config/locales/client.en.yml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/templates/user/billing/subscriptions.hbs b/assets/javascripts/discourse/templates/user/billing/subscriptions.hbs index 2e265db..c0890e7 100644 --- a/assets/javascripts/discourse/templates/user/billing/subscriptions.hbs +++ b/assets/javascripts/discourse/templates/user/billing/subscriptions.hbs @@ -21,7 +21,11 @@ {{#if subscription.loading}} {{loading-spinner size="small"}} {{else}} - {{d-button disabled=subscription.canceled_at label="discourse_subscriptions.user.subscriptions.cancelled" action=(route-action "cancelSubscription" subscription) icon="times"}} + {{#if subscription.canceled_at}} + {{d-button disabled=subscription.canceled_at label="discourse_subscriptions.user.subscriptions.cancelled"}} + {{else}} + {{d-button disabled=subscription.canceled_at label="discourse_subscriptions.user.subscriptions.cancel" action=(route-action "cancelSubscription" subscription) icon="times"}} + {{/if}} {{/if}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index cf49d79..4c199f9 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -52,6 +52,7 @@ en: status: Status renews: Renews created_at: Created + cancel: cancel cancelled: cancelled operations: destroy: