diff --git a/web/src/elements/forms/DeleteForm.ts b/web/src/elements/forms/DeleteForm.ts index 98816ff4b..9addbd92d 100644 --- a/web/src/elements/forms/DeleteForm.ts +++ b/web/src/elements/forms/DeleteForm.ts @@ -1,23 +1,18 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { BaseInheritanceModel } from "../../api/Client"; import { ModalButton } from "../buttons/ModalButton"; -export interface DeletableObject extends BaseInheritanceModel { - name: string | number; -} - @customElement("ak-forms-delete") export class DeleteForm extends ModalButton { - @property() - obj?: DeletableObject; + @property({attribute: false}) + obj?: Record; @property() objectLabel?: string; @property({attribute: false}) - delete!: () => Promise; + delete!: () => Promise; confirm(): void { this.delete().then(() => { @@ -35,7 +30,7 @@ export class DeleteForm extends ModalButton { return html`

- ${gettext(`Delete ${(this.obj?.verboseName) || this.objectLabel}`)} + ${gettext(`Delete ${this.objectLabel}`)}

@@ -47,7 +42,7 @@ export class DeleteForm extends ModalButton {

${gettext( - `Are you sure you want to delete ${(this.obj?.verboseName) || this.objectLabel} '${this.obj?.name}'?` + `Are you sure you want to delete ${this.objectLabel} '${this.obj?.name}'?` )}