Files
authentik/web/src/admin/policies/BasePolicyForm.ts
Ken Sternberg b181c551a5 web: expressing success (#7830)
* web: expressing success

Ever see an idiom that just, I dunno, *annoyed* you?

Automated tools for the win.

* web: repetition, repetition, repetition!  [throws chair]

* web: giving the de-duplication treatment to policy mappings.

* Created a BaseStageForm with success message and canonical primary key type for for Providers, Sources, and Stages.
2023-12-13 16:13:28 +01:00

12 lines
349 B
TypeScript

import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
import { msg } from "@lit/localize";
export abstract class BasePolicyForm<T> extends ModelForm<T, string> {
getSuccessMessage(): string {
return this.instance
? msg("Successfully updated policy.")
: msg("Successfully created policy.");
}
}