diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js index e73ef1256..e4560d179 100644 --- a/app/soapbox/features/edit_profile/index.js +++ b/app/soapbox/features/edit_profile/index.js @@ -78,11 +78,13 @@ class EditProfile extends ImmutablePureComponent { super(props); const { account } = this.props; const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']); + const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']); const initialState = account.withMutations(map => { map.merge(map.get('source')); map.delete('source'); map.set('fields', normalizeFields(map.get('fields'), props.maxFields)); map.set('stranger_notifications', strangerNotifications); + map.set('accepts_email_list', acceptsEmailList); unescapeParams(map, ['display_name', 'bio']); }); this.state = initialState.toObject(); @@ -117,6 +119,7 @@ class EditProfile extends ImmutablePureComponent { avatar: state.avatar_file, header: state.header_file, locked: state.locked, + accepts_email_list: state.accepts_email_list, }, this.getFieldParams().toJS()); } @@ -246,6 +249,13 @@ class EditProfile extends ImmutablePureComponent { checked={this.state.stranger_notifications} onChange={this.handleCheckboxChange} /> + } + hint={} + name='accepts_email_list' + checked={this.state.accepts_email_list} + onChange={this.handleCheckboxChange} + />
diff --git a/app/soapbox/features/landing_page/components/registration_form.js b/app/soapbox/features/landing_page/components/registration_form.js index 808e9d56f..47856351a 100644 --- a/app/soapbox/features/landing_page/components/registration_form.js +++ b/app/soapbox/features/landing_page/components/registration_form.js @@ -28,6 +28,7 @@ const messages = defineMessages({ agreement: { id: 'registration.agreement', defaultMessage: 'I agree to the {tos}.' }, tos: { id: 'registration.tos', defaultMessage: 'Terms of Service' }, close: { id: 'registration.confirmation_modal.close', defaultMessage: 'Close' }, + newsletter: { id: 'registration.newsletter', defaultMessage: 'Subscribe to newsletter.' }, }); const mapStateToProps = (state, props) => ({ @@ -232,6 +233,11 @@ class RegistrationForm extends ImmutablePureComponent { onChange={this.onCheckboxChange} required /> +