diff --git a/ghost/admin/app/components/modal-portal-settings.hbs b/ghost/admin/app/components/modal-portal-settings.hbs index 34ecf7aee7..a957e93157 100644 --- a/ghost/admin/app/components/modal-portal-settings.hbs +++ b/ghost/admin/app/components/modal-portal-settings.hbs @@ -221,7 +221,7 @@ />

Redirect to this URL after free signup

- {{#if (and this.isStripeConfigured (or this.isMonthlyChecked this.isYearlyChecked))}} + {{#if (and this.isStripeConfigured hasPaidPriceChecked)}} { + const prices = this.prices || []; + return prices.filter((d) => { return d.amount !== 0 && d.type === 'recurring'; }).map((price) => { return { @@ -65,6 +66,16 @@ export default ModalComponent.extend({ }); }), + hasPaidPriceChecked: computed('prices', 'settings.portalPlans.[]', function () { + const portalPlans = this.get('settings.portalPlans'); + const prices = this.prices || []; + return prices.filter((d) => { + return d.amount !== 0 && d.type === 'recurring'; + }).some((price) => { + return !!portalPlans.find(d => d === price.id); + }); + }), + buttonIcon: computed('settings.portalButtonIcon', function () { const defaultIconKeys = this.defaultButtonIcons.map(buttonIcon => buttonIcon.value); return (this.settings.get('portalButtonIcon') || defaultIconKeys[0]);