From 6a039be595a1a8fe8f88372d7d69dcd9abbd9f82 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 27 Apr 2021 15:36:45 +0100 Subject: [PATCH] Disabled portal subscription options when signup is disabled refs https://github.com/TryGhost/Team/issues/579 - subscription access set to 'invite' or 'none' disables signup so it doesn't make sense to allow those options to be changed when the portal preview won't reflect the settings - fixed "expand"/"close" button not changing on the access screen signup access block --- .../app/components/modal-portal-settings.hbs | 17 +++++++++-------- .../app/templates/settings/members-access.hbs | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ghost/admin/app/components/modal-portal-settings.hbs b/ghost/admin/app/components/modal-portal-settings.hbs index 6f580e1bf0..c46f1073c8 100644 --- a/ghost/admin/app/components/modal-portal-settings.hbs +++ b/ghost/admin/app/components/modal-portal-settings.hbs @@ -4,7 +4,7 @@

Portal settings

-
+

Signup options

@@ -21,7 +21,8 @@ checked={{this.settings.portalName}} id="signup-name-checkbox" name="signup-name-checkbox" - onclick={{action "togglePortalName" value="target.checked"}} + disabled={{not-eq this.settings.membersSignupAccess "all"}} + {{on "click" (action "togglePortalName" value="target.checked")}} > @@ -43,9 +44,9 @@ checked={{this.isFreeChecked}} id="free-plan" name="free-plan" - disabled={{not this.allowSelfSignup}} + disabled={{or (not this.isStripeConfigured) (not-eq this.settings.membersSignupAccess "all")}} class="gh-input post-settings-featured" - onclick={{action "toggleFreePlan" value="target.checked"}} + {{on "click" (action "toggleFreePlan" value="target.checked")}} data-test-checkbox="featured" > @@ -62,9 +63,9 @@ id="monthly-plan" name="monthly-plan" checked={{this.isMonthlyChecked}} - disabled={{not this.isStripeConfigured}} + disabled={{or (not this.isStripeConfigured) (not-eq this.settings.membersSignupAccess "all")}} class="gh-input post-settings-featured" - onclick={{action "toggleMonthlyPlan" value="target.checked"}} + {{on "click" (action "toggleMonthlyPlan" value="target.checked")}} data-test-checkbox="featured" > @@ -81,9 +82,9 @@ id="yearly-plan" name="yearly-plan" checked={{this.isYearlyChecked}} - disabled={{not this.isStripeConfigured}} + disabled={{or (not this.isStripeConfigured) (not-eq this.settings.membersSignupAccess "all")}} class="gh-input post-settings-featured" - onclick={{action "toggleYearlyPlan" value="target.checked"}} + {{on "click" (action "toggleYearlyPlan" value="target.checked")}} data-test-checkbox="featured" > diff --git a/ghost/admin/app/templates/settings/members-access.hbs b/ghost/admin/app/templates/settings/members-access.hbs index 9c9bf6d6c5..eff6edbf58 100644 --- a/ghost/admin/app/templates/settings/members-access.hbs +++ b/ghost/admin/app/templates/settings/members-access.hbs @@ -25,7 +25,7 @@

Subscription access

Who should be able to subscribe to your site?

- +
{{#liquid-if this.signupAccessOpen}}