Change OK button label based on whether the dialog is creating a new object or updating an existing one. (#23908)

This commit is contained in:
Cory Rivera
2023-07-17 15:54:30 -07:00
committed by GitHub
parent eeab2b4abe
commit fed4f2a18e
3 changed files with 7 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ export interface ObjectManagementDialogOptions extends ScriptableDialogOptions {
}
export abstract class ObjectManagementDialogBase<ObjectInfoType extends ObjectManagement.SqlObject, ViewInfoType extends ObjectManagement.ObjectViewInfo<ObjectInfoType>> extends ScriptableDialogBase<ObjectManagementDialogOptions> {
private _contextId: string;
private readonly _contextId: string;
private _viewInfo: ViewInfoType;
private _originalObjectInfo: ObjectInfoType;
@@ -46,6 +46,7 @@ export abstract class ObjectManagementDialogBase<ObjectInfoType extends ObjectMa
}
super(dialogTitle, dialogName, options);
this._contextId = generateUuid();
this.dialogObject.okButton.label = options.isNewObject ? localizedConstants.CreateObjectLabel : localizedConstants.ApplyUpdatesLabel;
}
protected postInitializeData(): void { }