diff --git a/web/src/admin/applications/wizard/ApplicationWizardPageBase.ts b/web/src/admin/applications/wizard/ApplicationWizardPageBase.ts index 7fe79413d..19db5ecbb 100644 --- a/web/src/admin/applications/wizard/ApplicationWizardPageBase.ts +++ b/web/src/admin/applications/wizard/ApplicationWizardPageBase.ts @@ -2,7 +2,7 @@ import { AKElement } from "@goauthentik/elements/Base"; import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter"; import { consume } from "@lit-labs/context"; -import { state } from "@lit/reactive-element/decorators/state.js"; +import { query, state } from "@lit/reactive-element/decorators.js"; import { styles as AwadStyles } from "./ApplicationWizardCss"; import type { WizardState } from "./ak-application-wizard-context"; @@ -13,12 +13,18 @@ export class ApplicationWizardPageBase extends CustomEmitterElement(AKElement) { return AwadStyles; } + @query("form") + form!: HTMLFormElement; + // @ts-expect-error @consume({ context: applicationWizardContext, subscribe: true }) @state() public wizard!: WizardState; dispatchWizardUpdate(update: Partial) { + // TODO: Incorporate this into the message heading upward: "the current step is valid." + console.log(this.form.reportValidity()); + this.dispatchCustomEvent("ak-application-wizard-update", { ...this.wizard, ...update, diff --git a/web/src/admin/applications/wizard/ak-application-wizard.ts b/web/src/admin/applications/wizard/ak-application-wizard.ts index fcbbd2ba5..b2ac9575a 100644 --- a/web/src/admin/applications/wizard/ak-application-wizard.ts +++ b/web/src/admin/applications/wizard/ak-application-wizard.ts @@ -84,6 +84,7 @@ export class ApplicationWizard extends CustomListenerElement(AKElement) { this.steps = newSteps; } + console.log(newWizardState); this.wizardState = newWizardState; }