diff --git a/apps/portal/src/App.js b/apps/portal/src/App.js index b9bf0ba13b..fddfcb48e6 100644 --- a/apps/portal/src/App.js +++ b/apps/portal/src/App.js @@ -397,8 +397,6 @@ export default class App extends React.Component { currency = currencyValue; } else if (key === 'disableBackground') { data.site.disableBackground = JSON.parse(value); - } else if (key === 'allowSelfSignup') { - data.site.allow_self_signup = JSON.parse(value); } else if (key === 'membersSignupAccess' && value) { data.site.members_signup_access = value; } else if (key === 'portalDefaultPlan' && value) { diff --git a/apps/portal/src/components/Frame.styles.js b/apps/portal/src/components/Frame.styles.js index 9c8cf9d820..af9689b438 100644 --- a/apps/portal/src/components/Frame.styles.js +++ b/apps/portal/src/components/Frame.styles.js @@ -999,7 +999,7 @@ const MobileStyles = ` margin-bottom: 0; } - .preview .gh-portal-invite-only-notification + .gh-portal-signup-message { + .preview .gh-portal-invite-only-notification + .gh-portal-signup-message, .preview .gh-portal-paid-members-only-notification + .gh-portal-signup-message { margin-bottom: 16px; } diff --git a/apps/portal/src/components/pages/SigninPage.js b/apps/portal/src/components/pages/SigninPage.js index 10621f8004..9adb3a08ff 100644 --- a/apps/portal/src/components/pages/SigninPage.js +++ b/apps/portal/src/components/pages/SigninPage.js @@ -5,7 +5,7 @@ import CloseButton from '../common/CloseButton'; import AppContext from '../../AppContext'; import InputForm from '../common/InputForm'; import {ValidateInputForm} from '../../utils/form'; -import {isSigninAllowed} from '../../utils/helpers'; +import {hasAvailablePrices, isSigninAllowed, isSignupAllowed} from '../../utils/helpers'; import {ReactComponent as InvitationIcon} from '../../images/icons/invitation.svg'; export default class SigninPage extends React.Component { @@ -131,6 +131,7 @@ export default class SigninPage extends React.Component { renderForm() { const {site, t} = this.context; + const isSignupAvailable = isSignupAllowed({site}) && hasAvailablePrices({site}); if (!isSigninAllowed({site})) { return ( @@ -158,7 +159,7 @@ export default class SigninPage extends React.Component { ); diff --git a/apps/portal/src/components/pages/SignupPage.js b/apps/portal/src/components/pages/SignupPage.js index 394eb6e016..f46e944b1a 100644 --- a/apps/portal/src/components/pages/SignupPage.js +++ b/apps/portal/src/components/pages/SignupPage.js @@ -7,7 +7,7 @@ import NewsletterSelectionPage from './NewsletterSelectionPage'; import ProductsSection from '../common/ProductsSection'; import InputForm from '../common/InputForm'; import {ValidateInputForm} from '../../utils/form'; -import {getSiteProducts, getSitePrices, hasAvailablePrices, hasOnlyFreePlan, isInviteOnly, isFreeSignupAllowed, isPaidMembersOnly, freeHasBenefitsOrDescription, hasMultipleNewsletters, hasFreeTrialTier, isSignupAllowed} from '../../utils/helpers'; +import {getSiteProducts, getSitePrices, hasAvailablePrices, hasOnlyFreePlan, isInviteOnly, isFreeSignupAllowed, isPaidMembersOnly, freeHasBenefitsOrDescription, hasMultipleNewsletters, hasFreeTrialTier, isSignupAllowed, isSigninAllowed} from '../../utils/helpers'; import {ReactComponent as InvitationIcon} from '../../images/icons/invitation.svg'; import {interceptAnchorClicks} from '../../utils/links'; @@ -177,7 +177,7 @@ footer.gh-portal-signup-footer.invite-only .gh-portal-signup-message { margin-top: 0; } -.gh-portal-invite-only-notification, .gh-portal-members-disabled-notification { +.gh-portal-invite-only-notification, .gh-portal-members-disabled-notification, .gh-portal-paid-members-only-notification { margin: 8px 32px 24px; padding: 0; text-align: center; @@ -194,7 +194,7 @@ footer.gh-portal-signup-footer.invite-only .gh-portal-signup-message { padding-bottom: 32px; } -.gh-portal-invite-only-notification + .gh-portal-signup-message { +.gh-portal-invite-only-notification + .gh-portal-signup-message, .gh-portal-paid-members-only-notification + .gh-portal-signup-message { margin-bottom: 12px; } @@ -670,6 +670,7 @@ class SignupPage extends React.Component {