* 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.
12 lines
349 B
TypeScript
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.");
|
|
}
|
|
}
|