import { gettext } from "django"; import { customElement, html, TemplateResult } from "lit-element"; import { DeleteForm } from "../../elements/forms/DeleteForm"; import { MessageLevel } from "../../elements/messages/Message"; import { showMessage } from "../../elements/messages/MessageContainer"; @customElement("ak-user-active-form") export class UserActiveForm extends DeleteForm { onSuccess(): void { showMessage({ message: gettext(`Successfully updated ${this.objectLabel} ${this.obj?.name}`), level: MessageLevel.success, }); } onError(e: Error): void { showMessage({ message: gettext(`Failed to update ${this.objectLabel}: ${e.toString()}`), level: MessageLevel.error, }); } renderModalInner(): TemplateResult { return html`

${gettext(`Update ${this.objectLabel}`)}

${gettext( `Are you sure you want to update ${this.objectLabel} '${this.obj?.name}'?` )}

`; } }