diff --git a/ghost/admin/app/components/gh-members-lab-setting.js b/ghost/admin/app/components/gh-members-lab-setting.js index 42f31bfa94..13392ba0c0 100644 --- a/ghost/admin/app/components/gh-members-lab-setting.js +++ b/ghost/admin/app/components/gh-members-lab-setting.js @@ -21,7 +21,7 @@ export default Component.extend({ yearly: yearlyPlan }; subscriptionSettings.stripeConfig = stripeProcessor.config; - subscriptionSettings.requirePaymentForSetup = !!subscriptionSettings.requirePaymentForSetup; + subscriptionSettings.allowSelfSignup = !!subscriptionSettings.allowSelfSignup; subscriptionSettings.fromAddress = subscriptionSettings.fromAddress || 'noreply'; return subscriptionSettings; @@ -59,8 +59,8 @@ export default Component.extend({ return plan; }); } - if (key === 'requirePaymentForSignup') { - subscriptionSettings.requirePaymentForSignup = !subscriptionSettings.requirePaymentForSignup; + if (key === 'allowSelfSignup') { + subscriptionSettings.allowSelfSignup = !subscriptionSettings.allowSelfSignup; } if (key === 'fromAddress') { subscriptionSettings.fromAddress = event.target.value; @@ -75,7 +75,7 @@ export default Component.extend({ } catch (e) { return { isPaid: false, - requirePaymentForSignup: false, + allowSelfSignup: true, fromAddress: 'noreply', paymentProcessors: [{ adapter: 'stripe', diff --git a/ghost/admin/app/controllers/settings/labs.js b/ghost/admin/app/controllers/settings/labs.js index b23c41557a..7963d93bd4 100644 --- a/ghost/admin/app/controllers/settings/labs.js +++ b/ghost/admin/app/controllers/settings/labs.js @@ -8,7 +8,6 @@ import { isRequestEntityTooLargeError, isUnsupportedMediaTypeError } from 'ghost-admin/services/ajax'; -import {computed} from '@ember/object'; import {isBlank} from '@ember/utils'; import {isArray as isEmberArray} from '@ember/array'; import {run} from '@ember/runloop'; @@ -63,25 +62,6 @@ export default Controller.extend({ this.yamlMimeType = YAML_MIME_TYPE; }, - subscriptionSettings: computed('settings.membersSubscriptionSettings', function () { - let subscriptionSettings = this.parseSubscriptionSettings(this.get('settings.membersSubscriptionSettings')); - let stripeProcessor = subscriptionSettings.paymentProcessors.find((proc) => { - return (proc.adapter === 'stripe'); - }); - let monthlyPlan = stripeProcessor.config.plans.find(plan => plan.interval === 'month'); - let yearlyPlan = stripeProcessor.config.plans.find(plan => plan.interval === 'year'); - monthlyPlan.dollarAmount = parseInt(monthlyPlan.amount) ? (monthlyPlan.amount / 100) : 0; - yearlyPlan.dollarAmount = parseInt(yearlyPlan.amount) ? (yearlyPlan.amount / 100) : 0; - stripeProcessor.config.plans = { - monthly: monthlyPlan, - yearly: yearlyPlan - }; - subscriptionSettings.stripeConfig = stripeProcessor.config; - subscriptionSettings.requirePaymentForSetup = !!subscriptionSettings.requirePaymentForSetup; - subscriptionSettings.fromAddress = subscriptionSettings.fromAddress || 'noreply'; - return subscriptionSettings; - }), - actions: { onUpload(file) { let formData = new FormData(); diff --git a/ghost/admin/app/templates/components/gh-members-lab-setting.hbs b/ghost/admin/app/templates/components/gh-members-lab-setting.hbs index 643e288650..a19a4a0b0d 100644 --- a/ghost/admin/app/templates/components/gh-members-lab-setting.hbs +++ b/ghost/admin/app/templates/components/gh-members-lab-setting.hbs @@ -83,11 +83,11 @@