mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
gender step uses blank default, lcase values
This commit is contained in:
parent
8f84051a86
commit
d905f624ca
1 changed files with 4 additions and 4 deletions
|
@ -67,7 +67,7 @@ class GenderStep extends React.Component {
|
||||||
handleValidSubmit (formData, formikBag) {
|
handleValidSubmit (formData, formikBag) {
|
||||||
formikBag.setSubmitting(false);
|
formikBag.setSubmitting(false);
|
||||||
if (!formData.gender || formData.gender === 'null') {
|
if (!formData.gender || formData.gender === 'null') {
|
||||||
formData.gender = 'Prefer not to say';
|
formData.gender = ''; // default to blank
|
||||||
}
|
}
|
||||||
delete formData.custom;
|
delete formData.custom;
|
||||||
this.props.onNextStep(formData);
|
this.props.onNextStep(formData);
|
||||||
|
@ -102,20 +102,20 @@ class GenderStep extends React.Component {
|
||||||
id="GenderRadioOptionFemale"
|
id="GenderRadioOptionFemale"
|
||||||
label={this.props.intl.formatMessage({id: 'general.female'})}
|
label={this.props.intl.formatMessage({id: 'general.female'})}
|
||||||
selectedValue={values.gender}
|
selectedValue={values.gender}
|
||||||
value="Female"
|
value="female"
|
||||||
onSetFieldValue={setFieldValue}
|
onSetFieldValue={setFieldValue}
|
||||||
/>
|
/>
|
||||||
<GenderOption
|
<GenderOption
|
||||||
id="GenderRadioOptionMale"
|
id="GenderRadioOptionMale"
|
||||||
label={this.props.intl.formatMessage({id: 'general.male'})}
|
label={this.props.intl.formatMessage({id: 'general.male'})}
|
||||||
selectedValue={values.gender}
|
selectedValue={values.gender}
|
||||||
value="Male"
|
value="male"
|
||||||
onSetFieldValue={setFieldValue}
|
onSetFieldValue={setFieldValue}
|
||||||
/>
|
/>
|
||||||
<GenderOption
|
<GenderOption
|
||||||
label={this.props.intl.formatMessage({id: 'general.nonBinary'})}
|
label={this.props.intl.formatMessage({id: 'general.nonBinary'})}
|
||||||
selectedValue={values.gender}
|
selectedValue={values.gender}
|
||||||
value="Non-binary"
|
value="non-binary"
|
||||||
onSetFieldValue={setFieldValue}
|
onSetFieldValue={setFieldValue}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue