diff --git a/api/js/etemplate/et2_widget_dialog.ts b/api/js/etemplate/et2_widget_dialog.ts index f260d0a636..c12bf2763c 100644 --- a/api/js/etemplate/et2_widget_dialog.ts +++ b/api/js/etemplate/et2_widget_dialog.ts @@ -71,6 +71,23 @@ export class et2_dialog extends Et2Dialog super.template = value; } + _getButtons() : any + { + if(Array.isArray(this.buttons) && this.buttons[0].text) + { + console.warn("Button definitions should follow DialogButton interface", this, this.buttons); + return this.buttons.map((button) => + { + if(button.text) + { + button.label = button.text; + } + return button; + }); + } + return super._getButtons(); + } + /** * @deprecated * @returns {any}