Skip to content
Snippets Groups Projects
Unverified Commit 3b922da9 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix language dropdown being hidden on profile for external accounts (#4762)

* Fix language dropdown being hidden on profile for external accounts

* eslint
parent 816166ad
Branches
Tags
No related merge requests found
......@@ -30,12 +30,15 @@ export default function Profile() {
{ t('user.account.account_info') }
</Nav.Link>
</Nav.Item>
{ !currentUser.external_account
&& (
<Nav.Item>
<Nav.Link className="cursor-pointer text-muted" eventKey="third">
<LockClosedIcon className="hi-s text-muted me-3 pb-1" />
{ t('user.account.change_password') }
</Nav.Link>
</Nav.Item>
)}
<Nav.Item>
<Nav.Link className="cursor-pointer text-muted" eventKey="second">
<TrashIcon className="hi-s text-muted me-3 pb-1" />
......@@ -53,9 +56,12 @@ export default function Profile() {
<Tab.Pane eventKey="second">
<DeleteAccount />
</Tab.Pane>
{ !currentUser.external_account
&& (
<Tab.Pane eventKey="third">
<ChangePassword />
</Tab.Pane>
)}
</Tab.Content>
</Col>
</Row>
......
......@@ -36,14 +36,11 @@ export default function UpdateUserForm({ user }) {
<Form methods={methods} onSubmit={updateUserAPI.mutate}>
<FormControl field={fields.name} type="text" />
<FormControl field={fields.email} type="email" readOnly />
{ !currentUser?.external_account
&& (
<FormSelect field={fields.language} variant="dropdown">
{
Object.keys(localesAPI.data || {}).map((code) => <Option key={code} value={code}>{localesAPI.data[code]}</Option>)
}
</FormSelect>
)}
{(canUpdateRole && rolesAPI.data) && (
<FormSelect field={fields.role_id} variant="dropdown">
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment