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:
parent
87fa50c492
commit
2eb7c16a9a
|
@ -8,6 +8,7 @@ Authentik takes security very seriously. We follow the rules of [responsible dis
|
||||||
| --------- | ------------------ |
|
| --------- | ------------------ |
|
||||||
| 2022.12.x | :white_check_mark: |
|
| 2022.12.x | :white_check_mark: |
|
||||||
| 2023.1.x | :white_check_mark: |
|
| 2023.1.x | :white_check_mark: |
|
||||||
|
| 2023.2.x | :white_check_mark: |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,17 @@ export class InitialServiceConnectionWizardPage extends WizardPage {
|
||||||
}
|
}
|
||||||
sidebarLabel = () => t`Select type`;
|
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 {
|
render(): TemplateResult {
|
||||||
return html`<form class="pf-c-form pf-m-horizontal">
|
return html`<form class="pf-c-form pf-m-horizontal">
|
||||||
${this.connectionTypes.map((type) => {
|
${this.connectionTypes.map((type) => {
|
||||||
|
|
|
@ -37,6 +37,17 @@ export class InitialPolicyWizardPage extends WizardPage {
|
||||||
}
|
}
|
||||||
sidebarLabel = () => t`Select type`;
|
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 {
|
render(): TemplateResult {
|
||||||
return html`<form class="pf-c-form pf-m-horizontal">
|
return html`<form class="pf-c-form pf-m-horizontal">
|
||||||
${this.policyTypes.map((type) => {
|
${this.policyTypes.map((type) => {
|
||||||
|
|
|
@ -34,6 +34,17 @@ export class InitialPropertyMappingWizardPage extends WizardPage {
|
||||||
}
|
}
|
||||||
sidebarLabel = () => t`Select type`;
|
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 {
|
render(): TemplateResult {
|
||||||
return html`<form class="pf-c-form pf-m-horizontal">
|
return html`<form class="pf-c-form pf-m-horizontal">
|
||||||
${this.mappingTypes.map((type) => {
|
${this.mappingTypes.map((type) => {
|
||||||
|
|
|
@ -36,6 +36,17 @@ export class InitialProviderWizardPage extends WizardPage {
|
||||||
}
|
}
|
||||||
sidebarLabel = () => t`Select type`;
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
renderHint(): TemplateResult {
|
renderHint(): TemplateResult {
|
||||||
return html`<div class="pf-c-hint">
|
return html`<div class="pf-c-hint">
|
||||||
<div class="pf-c-hint__title">${t`Try the new application wizard`}</div>
|
<div class="pf-c-hint__title">${t`Try the new application wizard`}</div>
|
||||||
|
|
|
@ -33,6 +33,17 @@ export class InitialSourceWizardPage extends WizardPage {
|
||||||
}
|
}
|
||||||
sidebarLabel = () => t`Select type`;
|
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 {
|
render(): TemplateResult {
|
||||||
return html`<form class="pf-c-form pf-m-horizontal">
|
return html`<form class="pf-c-form pf-m-horizontal">
|
||||||
${this.sourceTypes.map((type) => {
|
${this.sourceTypes.map((type) => {
|
||||||
|
|
|
@ -50,6 +50,17 @@ export class InitialStageWizardPage extends WizardPage {
|
||||||
return [PFBase, PFForm, PFButton, AKGlobal, PFRadio];
|
return [PFBase, PFForm, PFButton, AKGlobal, PFRadio];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 {
|
render(): TemplateResult {
|
||||||
return html`<form class="pf-c-form pf-m-horizontal">
|
return html`<form class="pf-c-form pf-m-horizontal">
|
||||||
${this.stageTypes.map((type) => {
|
${this.stageTypes.map((type) => {
|
||||||
|
|
Reference in New Issue