mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Replaced signup with invite-only screen for no plans
no issue - If the site owner has no active plan enabled for signup in settings, it implies an invite-only site usecase which needs to be highlighted to he user - Shows the invite only message along with option to login when SIgnup screen is opened in such scenario
This commit is contained in:
parent
510dfd75d9
commit
ae2023999a
@ -304,6 +304,11 @@ class SignupPage extends React.Component {
|
||||
renderSubmitButton() {
|
||||
const {action, site, brandColor} = this.context;
|
||||
|
||||
const availablePlans = getSitePlans({site});
|
||||
if (availablePlans.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let label = 'Continue';
|
||||
if (hasOnlyFreePlan({site})) {
|
||||
label = 'Sign up';
|
||||
@ -367,7 +372,17 @@ class SignupPage extends React.Component {
|
||||
|
||||
renderForm() {
|
||||
const fields = this.getInputFields({state: this.state});
|
||||
|
||||
const {site} = this.context;
|
||||
const availablePlans = getSitePlans({site});
|
||||
if (availablePlans.length === 0) {
|
||||
return (
|
||||
<section>
|
||||
<div className='gh-portal-section'>
|
||||
This site is invite only. Contact owner if you'd like to sign up.
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<section>
|
||||
<div className='gh-portal-section'>
|
||||
|
Loading…
Reference in New Issue
Block a user