import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; import { ModalButton } from "../buttons/ModalButton"; import { Form } from "./Form"; @customElement("ak-forms-modal") export class ModalForm extends ModalButton { confirm(): void { this.querySelectorAll>("[slot=form]").forEach(form => { const formPromise = form.submit(new Event("submit")); if (!formPromise) { return; } formPromise.then((a) => { this.open = false; }).catch((e) => { console.log(e); }); }); } renderModalInner(): TemplateResult { return html`

`; } }