From 540eee16120e295b1c1ee4d33004298d6c9492c7 Mon Sep 17 00:00:00 2001 From: Ken Sternberg Date: Sun, 30 Jul 2023 06:26:54 -0700 Subject: [PATCH] Adding comments to the wizard. --- web/src/elements/wizard/WizardFormPage.ts | 2 ++ web/src/elements/wizard/WizardPage.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/web/src/elements/wizard/WizardFormPage.ts b/web/src/elements/wizard/WizardFormPage.ts index 2d3e5b3b4..514b45fee 100644 --- a/web/src/elements/wizard/WizardFormPage.ts +++ b/web/src/elements/wizard/WizardFormPage.ts @@ -12,6 +12,8 @@ import PFFormControl from "@patternfly/patternfly/components/FormControl/form-co import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; +/* NOT USED */ + @customElement("ak-wizard-form") export abstract class WizardForm extends Form { viewportCheck = false; diff --git a/web/src/elements/wizard/WizardPage.ts b/web/src/elements/wizard/WizardPage.ts index 6fdee111f..3a6be581b 100644 --- a/web/src/elements/wizard/WizardPage.ts +++ b/web/src/elements/wizard/WizardPage.ts @@ -21,10 +21,18 @@ export class WizardPage extends AKElement { return this.parentElement as Wizard; } + /** + * Called when this is the page brought into view + */ activeCallback: () => Promise = async () => { this.host.isValid = false; }; + /** + * Called when the `next` button on the wizard is pressed. For forms, results in the submission + * of the current form to the back-end before being allowed to proceed to the next page. This is + * sub-optimal if we want to collect multiple bits of data before finishing the whole course. + */ nextCallback: () => Promise = async () => { return true; };