0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

🐛 Fixed member signup from offer when terms are not specified (#17795)

fixes https://github.com/TryGhost/Product/issues/3753

The validation for the terms checkbox was being executed when the terms
checkbox was not being rendered. The validation checks needed to be
updated to account for if the checkbox was rendered or not. Basically
the same as this:
45a70a3f4c
This commit is contained in:
Michael Barrett 2023-08-23 13:25:26 +01:00 committed by GitHub
parent 429e8ed4d9
commit a69841a465
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ export default class OfferPage extends React.Component {
}
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;
return {