diff --git a/src/shared-components/FormView/BrokerProperties/ConfigurationPage/AcceptorsConfigPage/AcceptorConfigSection/PresetButton/PresetButton.tsx b/src/shared-components/FormView/BrokerProperties/ConfigurationPage/AcceptorsConfigPage/AcceptorConfigSection/PresetButton/PresetButton.tsx index c367bea9..f40b83c6 100644 --- a/src/shared-components/FormView/BrokerProperties/ConfigurationPage/AcceptorsConfigPage/AcceptorConfigSection/PresetButton/PresetButton.tsx +++ b/src/shared-components/FormView/BrokerProperties/ConfigurationPage/AcceptorsConfigPage/AcceptorConfigSection/PresetButton/PresetButton.tsx @@ -4,6 +4,7 @@ import { Card, CardBody, CardFooter, + CardHeader, CardTitle, Form, FormFieldGroup, @@ -87,6 +88,17 @@ const AddPresetModal: FC = ({ useHasCertManager(); const isCertMangerDependencySatisfied = hasCertManager && !isLoadingCertManagerAvailability; + const onChange = (event: React.FormEvent) => { + if (event.currentTarget.id === 'certmanagerandingress') { + if (!isCertMangerDependencySatisfied) { + return; + } + if (hasACertManagerAnnotation) { + return; + } + setShowCertManagerForm(!showCertManagerForm); + } + }; return ( = ({ > { - if (!isCertMangerDependencySatisfied) { - return; - } - if (hasACertManagerAnnotation) { - return; - } - setShowCertManagerForm(!showCertManagerForm); - }} isSelectable isSelected={showCertManagerForm} - hasSelectableInput isCompact style={{ 'max-width': '100%' } as CSSProperties} - isDisabled - tabIndex={0} + isDisabled={!isCertMangerDependencySatisfied} > - {t('Annotate_an_acceptor_with_an_issuer')} - {!isCertMangerDependencySatisfied && ( - - <> - - {' Preset disabled as CertManager is missing'} - - - )} -
+ + {t('Annotate_an_acceptor_with_an_issuer')} + {!isCertMangerDependencySatisfied && ( + + <> + + {' Preset disabled as CertManager is missing'} + + + )} + diff --git a/src/shared-components/FormView/BrokerProperties/ConfigurationPage/CertSecretSelector/CertSecretSelector.tsx b/src/shared-components/FormView/BrokerProperties/ConfigurationPage/CertSecretSelector/CertSecretSelector.tsx index cd7b167f..86d32b20 100644 --- a/src/shared-components/FormView/BrokerProperties/ConfigurationPage/CertSecretSelector/CertSecretSelector.tsx +++ b/src/shared-components/FormView/BrokerProperties/ConfigurationPage/CertSecretSelector/CertSecretSelector.tsx @@ -545,12 +545,6 @@ export const CertSecretSelector: FC = ({ 'cert mgr pods: ' + certManagerDeployments.length.toString(), ); - if (certManagerDeployments.length === 0) { - failedSecretGen( - 'No cert-manager found\n' + 'please install cert-manager.', - ); - return; - } if (!certMgrFound) { failedSecretGen( 'No cert-manager found\n' + 'please install cert-manager.',