From ccffa35037a87bd62e6cc732154228cf7da92de8 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Wed, 25 Sep 2019 09:57:40 -0400 Subject: [PATCH] change gender string defaults --- src/components/join-flow/gender-step.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/join-flow/gender-step.jsx b/src/components/join-flow/gender-step.jsx index 1aa358183..aeeb970e6 100644 --- a/src/components/join-flow/gender-step.jsx +++ b/src/components/join-flow/gender-step.jsx @@ -66,8 +66,14 @@ class GenderStep extends React.Component { } handleValidSubmit (formData, formikBag) { formikBag.setSubmitting(false); - if (!formData.gender || formData.gender === 'null') { - formData.gender = ''; // default to blank + // handle defaults: + // 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; this.props.onNextStep(formData); @@ -155,7 +161,7 @@ class GenderStep extends React.Component { id="GenderRadioOptionPreferNot" label={this.props.intl.formatMessage({id: 'registration.genderOptionPreferNotToSay'})} selectedValue={values.gender} - value="Prefer not to say" + value="(Prefer not to say)" onSetFieldValue={setFieldValue} />