web/admin: set valid correctly when opened and radio is already selected (#4821)

closes #4813

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-03-01 16:14:32 +01:00
committed by GitHub
parent 87fa50c492
commit 2eb7c16a9a
7 changed files with 68 additions and 1 deletions

View File

@ -31,6 +31,17 @@ export class InitialServiceConnectionWizardPage extends WizardPage {
}
sidebarLabel = () => t`Select type`;
activeCallback: () => Promise<void> = async () => {
this.host.isValid = false;
this.shadowRoot
?.querySelectorAll<HTMLInputElement>("input[type=radio]")
.forEach((radio) => {
if (radio.checked) {
this.host.isValid = true;
}
});
};
render(): TemplateResult {
return html`<form class="pf-c-form pf-m-horizontal">
${this.connectionTypes.map((type) => {