disable vendor if provider exists (#1447)
This commit is contained in:
parent
9c48bb4d90
commit
8e5ce6aa34
2 changed files with 4 additions and 1 deletions
|
@ -299,7 +299,7 @@ export default function UserFederationLdapSettings() {
|
|||
t("advancedSettings"),
|
||||
]}
|
||||
>
|
||||
<LdapSettingsGeneral form={form} />
|
||||
<LdapSettingsGeneral form={form} vendorEdit={!!id} />
|
||||
<LdapSettingsConnection form={form} edit={!!id} />
|
||||
<LdapSettingsSearching form={form} />
|
||||
<LdapSettingsSynchronization form={form} />
|
||||
|
|
|
@ -19,12 +19,14 @@ export type LdapSettingsGeneralProps = {
|
|||
form: UseFormMethods;
|
||||
showSectionHeading?: boolean;
|
||||
showSectionDescription?: boolean;
|
||||
vendorEdit?: boolean;
|
||||
};
|
||||
|
||||
export const LdapSettingsGeneral = ({
|
||||
form,
|
||||
showSectionHeading = false,
|
||||
showSectionDescription = false,
|
||||
vendorEdit = false,
|
||||
}: LdapSettingsGeneralProps) => {
|
||||
const { t } = useTranslation("user-federation");
|
||||
const helpText = useTranslation("user-federation-help").t;
|
||||
|
@ -174,6 +176,7 @@ export const LdapSettingsGeneral = ({
|
|||
control={form.control}
|
||||
render={({ onChange, value }) => (
|
||||
<Select
|
||||
isDisabled={!!vendorEdit}
|
||||
toggleId="kc-vendor"
|
||||
required
|
||||
onToggle={() => setIsVendorDropdownOpen(!isVendorDropdownOpen)}
|
||||
|
|
Loading…
Reference in a new issue