Attributes without a value set are not rendered in the account console (#22968)
Closes #22961
This commit is contained in:
parent
fec6237dca
commit
4d71138f70
1 changed files with 41 additions and 43 deletions
|
@ -197,7 +197,7 @@ export class AccountPage extends React.Component<AccountPageProps, AccountPageSt
|
|||
)}
|
||||
</FormGroup>
|
||||
)}
|
||||
{!this.isUpdateEmailFeatureEnabled && fields.email != undefined && <FormGroup
|
||||
{!this.isUpdateEmailFeatureEnabled && <FormGroup
|
||||
label={Msg.localize('email')}
|
||||
fieldId="email-address"
|
||||
helperTextInvalid={this.state.errors.email}
|
||||
|
@ -250,58 +250,56 @@ export class AccountPage extends React.Component<AccountPageProps, AccountPageSt
|
|||
}
|
||||
</InputGroup>
|
||||
</FormGroup> }
|
||||
{ fields.firstName != undefined && <FormGroup
|
||||
label={Msg.localize("firstName")}
|
||||
fieldId="first-name"
|
||||
helperTextInvalid={this.state.errors.firstName}
|
||||
<FormGroup
|
||||
label={Msg.localize("firstName")}
|
||||
fieldId="first-name"
|
||||
helperTextInvalid={this.state.errors.firstName}
|
||||
validated={
|
||||
this.state.errors.firstName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
isRequired
|
||||
type="text"
|
||||
id="first-name"
|
||||
name="firstName"
|
||||
maxLength={254}
|
||||
value={fields.firstName}
|
||||
onChange={this.handleChange}
|
||||
validated={
|
||||
this.state.errors.firstName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
isRequired
|
||||
type="text"
|
||||
id="first-name"
|
||||
name="firstName"
|
||||
maxLength={254}
|
||||
value={fields.firstName}
|
||||
onChange={this.handleChange}
|
||||
validated={
|
||||
this.state.errors.firstName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
></TextInput>
|
||||
</FormGroup>
|
||||
}
|
||||
{fields.lastName != undefined && <FormGroup
|
||||
label={Msg.localize("lastName")}
|
||||
fieldId="last-name"
|
||||
helperTextInvalid={this.state.errors.lastName}
|
||||
></TextInput>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={Msg.localize("lastName")}
|
||||
fieldId="last-name"
|
||||
helperTextInvalid={this.state.errors.lastName}
|
||||
validated={
|
||||
this.state.errors.lastName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
isRequired
|
||||
type="text"
|
||||
id="last-name"
|
||||
name="lastName"
|
||||
maxLength={254}
|
||||
value={fields.lastName}
|
||||
onChange={this.handleChange}
|
||||
validated={
|
||||
this.state.errors.lastName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
isRequired
|
||||
type="text"
|
||||
id="last-name"
|
||||
name="lastName"
|
||||
maxLength={254}
|
||||
value={fields.lastName}
|
||||
onChange={this.handleChange}
|
||||
validated={
|
||||
this.state.errors.lastName !== ""
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
></TextInput>
|
||||
</FormGroup>
|
||||
}
|
||||
></TextInput>
|
||||
</FormGroup>
|
||||
{features.isInternationalizationEnabled && (
|
||||
<FormGroup
|
||||
label={Msg.localize("selectLocale")}
|
||||
|
|
Loading…
Reference in a new issue