import { MessageLevel } from "@goauthentik/common/messages"; import "@goauthentik/elements/buttons/SpinnerButton"; import { DeleteForm } from "@goauthentik/elements/forms/DeleteForm"; import { showMessage } from "@goauthentik/elements/messages/MessageContainer"; import { t } from "@lingui/macro"; import { TemplateResult, html } from "lit"; import { customElement } from "lit/decorators.js"; @customElement("ak-user-active-form") export class UserActiveForm extends DeleteForm { onSuccess(): void { showMessage({ message: t`Successfully updated ${this.objectLabel} ${this.obj?.name}`, level: MessageLevel.success, }); } onError(e: Error): void { showMessage({ message: t`Failed to update ${this.objectLabel}: ${e.toString()}`, level: MessageLevel.error, }); } renderModalInner(): TemplateResult { return html` ${t`Update ${this.objectLabel}`} ${t`Are you sure you want to update ${this.objectLabel} "${this.obj?.name}"?`} `; } }
${t`Are you sure you want to update ${this.objectLabel} "${this.obj?.name}"?`}