Web: People: disabled user type change

This commit is contained in:
Nikita Gopienko 2021-05-18 18:00:29 +03:00
parent 07934f6cd9
commit bc901b8a4a

View File

@ -548,6 +548,7 @@ class UpdateUserForm extends React.Component {
//avatarMax,
disableProfileType,
isAdmin,
isSelf,
} = this.props;
const {
guestCaption,
@ -635,6 +636,9 @@ class UpdateUserForm extends React.Component {
</>
);
const radioIsDisabled =
isSelf || (profile.listAdminModules && !!profile.listAdminModules.length);
return (
<>
<MainContainer>
@ -775,7 +779,9 @@ class UpdateUserForm extends React.Component {
{ value: "true", label: guestCaption },
{ value: "false", label: userCaption },
]}
radioIsDisabled={isLoading || disableProfileType}
radioIsDisabled={
isLoading || disableProfileType || radioIsDisabled
}
radioOnChange={this.onUserTypeChange}
tooltipContent={tooltipTypeContent}
helpButtonHeaderContent={t("UserType")}