mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Added new settings for members modal settings (#11927)
no issue - Adds new settings for members modal customization to default settings - `membersjs_show_beacon` controls the visibility of beacon in members modal - `membersjs_show_signup_name` controls the visibility of name field in signup - `membersjs_allowed_plans` controls the visibility of plans allowed for member to signup with - Adds stripe connect check to determine if stripe is setup or not - Adds the 3 new settings to members site data
This commit is contained in:
parent
78bf5d1e21
commit
ea7d450a9b
@ -220,6 +220,23 @@
|
||||
},
|
||||
"stripe_connect_integration": {
|
||||
"defaultValue": "{}"
|
||||
},
|
||||
"membersjs_show_signup_name": {
|
||||
"defaultValue": "true",
|
||||
"validations": {
|
||||
"isEmpty": false,
|
||||
"isIn": [["true", "false"]]
|
||||
}
|
||||
},
|
||||
"membersjs_show_beacon": {
|
||||
"defaultValue": "true",
|
||||
"validations": {
|
||||
"isEmpty": false,
|
||||
"isIn": [["true", "false"]]
|
||||
}
|
||||
},
|
||||
"membersjs_allowed_plans": {
|
||||
"defaultValue": "[\"free\", \"monthly\", \"yearly\"]"
|
||||
}
|
||||
},
|
||||
"bulk_email": {
|
||||
|
@ -89,7 +89,9 @@ const getMemberSiteData = async function (req, res) {
|
||||
);
|
||||
const stripeSecretToken = stripePaymentProcessor && stripePaymentProcessor.config.secret_token;
|
||||
const stripePublicToken = stripePaymentProcessor && stripePaymentProcessor.config.public_token;
|
||||
const isStripeConfigured = (!!stripeSecretToken && stripeSecretToken !== '' && !!stripePublicToken && stripePublicToken !== '');
|
||||
const stripeConnectIntegration = settingsCache.get('stripe_connect_integration');
|
||||
|
||||
const isStripeConfigured = (!!stripeSecretToken && !!stripePublicToken) || !!(stripeConnectIntegration && stripeConnectIntegration.account_id);
|
||||
const response = {
|
||||
title: settingsCache.get('title'),
|
||||
description: settingsCache.get('description'),
|
||||
@ -99,7 +101,10 @@ const getMemberSiteData = async function (req, res) {
|
||||
version: ghostVersion.safe,
|
||||
plans: membersService.config.getPublicPlans(),
|
||||
allowSelfSignup: membersService.config.getAllowSelfSignup(),
|
||||
isStripeConfigured
|
||||
isStripeConfigured,
|
||||
show_beacon: settingsCache.get('membersjs_show_beacon'),
|
||||
show_signup_name: settingsCache.get('membersjs_show_signup_name'),
|
||||
allowed_plans: settingsCache.get('membersjs_allowed_plans')
|
||||
};
|
||||
|
||||
// Brand is currently an experimental feature
|
||||
|
Loading…
Reference in New Issue
Block a user