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:
@ -33,6 +33,17 @@ export class InitialSourceWizardPage 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.sourceTypes.map((type) => {
|
||||
|
||||
Reference in New Issue
Block a user