0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

🐛 Fixed Member signup when signup terms are null

We only display the signup checkbox if both the checkbox is required AND we
have some terms to display alongside it. However we require the checkbox to be
checked, regardless of if it is displayed. This results in the Signup button
not working at all if your settings are in this state.
This commit is contained in:
Fabien "egg" O'Carroll 2023-05-08 11:07:13 -04:00
parent c6a75cf015
commit 45a70a3f4c

View file

@ -363,7 +363,7 @@ class SignupPage extends React.Component {
} }
getFormErrors(state) { getFormErrors(state) {
const checkboxRequired = this.context.site.portal_signup_checkbox_required; const checkboxRequired = this.context.site.portal_signup_checkbox_required && this.context.site.portal_signup_terms_html;
const checkboxError = checkboxRequired && !state.termsCheckboxChecked; const checkboxError = checkboxRequired && !state.termsCheckboxChecked;
return { return {