From 0ec8636a7b4f7ecbad331e0859cc27c84bf68d4a Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 2 Nov 2022 13:50:50 +0100 Subject: [PATCH] do NOT submit dialog, if it has no etemplate_exec_id, it only gives and error on server-side --- api/js/etemplate/Et2Dialog/Et2Dialog.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/js/etemplate/Et2Dialog/Et2Dialog.ts b/api/js/etemplate/Et2Dialog/Et2Dialog.ts index cadf3154ea..8b0f2df542 100644 --- a/api/js/etemplate/Et2Dialog/Et2Dialog.ts +++ b/api/js/etemplate/Et2Dialog/Et2Dialog.ts @@ -747,6 +747,14 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo this._overlayContentNode.appendChild(button); }) } + // do NOT submit dialog, if it has no etemplate_exec_id, it only gives and error on server-side + if (this._template_widget && !this._template_widget.widgetContainer.getInstanceManager().etemplate_exec_id) + { + this._template_widget?.DOMContainer.querySelectorAll('et2-button').forEach((button : Et2Button) => + { + button.noSubmit = true; + }); + } return template_buttons; }