Add more missing stuff

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:21:00 -08:00
parent dd30028c5d
commit 4b0f7a80d7
@@ -390,17 +390,23 @@ export const CreateProfileModal = ({ isOpen, onClose, profile, mode = "create" }
{...field} {...field}
onValueChange={(value) => { onValueChange={(value) => {
if (watchedEnrollmentType === "est") { if (watchedEnrollmentType === "est") {
setValue("apiConfig", undefined);
setValue("estConfig", { setValue("estConfig", {
disableBootstrapCaValidation: false, disableBootstrapCaValidation: false,
passphrase: "" passphrase: ""
}); });
setValue("apiConfig", undefined); setValue("acmeConfig", undefined);
} else { } else if (watchedEnrollmentType === "api") {
setValue("apiConfig", { setValue("apiConfig", {
autoRenew: false, autoRenew: false,
renewBeforeDays: 30 renewBeforeDays: 30
}); });
setValue("estConfig", undefined); setValue("estConfig", undefined);
setValue("acmeConfig", undefined);
} else if (watchedEnrollmentType === "acme") {
setValue("estConfig", undefined);
setValue("apiConfig", undefined);
setValue("acmeConfig", {});
} }
onChange(value); onChange(value);
}} }}
@@ -438,12 +444,14 @@ export const CreateProfileModal = ({ isOpen, onClose, profile, mode = "create" }
disableBootstrapCaValidation: false, disableBootstrapCaValidation: false,
passphrase: "" passphrase: ""
}); });
setValue("acmeConfig", undefined);
} else if (value === "api") { } else if (value === "api") {
setValue("estConfig", undefined);
setValue("apiConfig", { setValue("apiConfig", {
autoRenew: false, autoRenew: false,
renewBeforeDays: 30 renewBeforeDays: 30
}); });
setValue("estConfig", undefined);
setValue("acmeConfig", undefined);
} else if (value === "acme") { } else if (value === "acme") {
setValue("apiConfig", undefined); setValue("apiConfig", undefined);
setValue("estConfig", undefined); setValue("estConfig", undefined);