mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
change gender string defaults
This commit is contained in:
parent
d905f624ca
commit
ccffa35037
1 changed files with 9 additions and 3 deletions
|
@ -66,8 +66,14 @@ class GenderStep extends React.Component {
|
||||||
}
|
}
|
||||||
handleValidSubmit (formData, formikBag) {
|
handleValidSubmit (formData, formikBag) {
|
||||||
formikBag.setSubmitting(false);
|
formikBag.setSubmitting(false);
|
||||||
if (!formData.gender || formData.gender === 'null') {
|
// handle defaults:
|
||||||
formData.gender = ''; // default to blank
|
// when gender is specifically made blank, use "(blank)"
|
||||||
|
if (!formData.gender || formData.gender === '') {
|
||||||
|
formData.gender = '(blank)';
|
||||||
|
}
|
||||||
|
// when user clicks Next without making any selection, use "(skipped)"
|
||||||
|
if (formData.gender === 'null') {
|
||||||
|
formData.gender = '(skipped)';
|
||||||
}
|
}
|
||||||
delete formData.custom;
|
delete formData.custom;
|
||||||
this.props.onNextStep(formData);
|
this.props.onNextStep(formData);
|
||||||
|
@ -155,7 +161,7 @@ class GenderStep extends React.Component {
|
||||||
id="GenderRadioOptionPreferNot"
|
id="GenderRadioOptionPreferNot"
|
||||||
label={this.props.intl.formatMessage({id: 'registration.genderOptionPreferNotToSay'})}
|
label={this.props.intl.formatMessage({id: 'registration.genderOptionPreferNotToSay'})}
|
||||||
selectedValue={values.gender}
|
selectedValue={values.gender}
|
||||||
value="Prefer not to say"
|
value="(Prefer not to say)"
|
||||||
onSetFieldValue={setFieldValue}
|
onSetFieldValue={setFieldValue}
|
||||||
/>
|
/>
|
||||||
<div className="join-flow-privacy-message join-flow-gender-privacy">
|
<div className="join-flow-privacy-message join-flow-gender-privacy">
|
||||||
|
|
Loading…
Reference in a new issue