Add handling for confirm on button click that better matches normal execution path

This works better for buttons that are in a namespace
This commit is contained in:
nathangray 2021-04-19 10:09:49 -06:00
parent 2defb9a704
commit 50b4067299
2 changed files with 17 additions and 3 deletions

View File

@ -537,6 +537,11 @@ var et2_dialog = /** @class */ (function (_super) {
if (_postSubmit) {
senders.getRoot().getInstanceManager().postSubmit(buttonId);
}
else if (senders.instanceOf(et2_widget_button_1.et2_button) && senders.getType() !== "buttononly") {
senders.clicked = true;
senders.getInstanceManager().submit(senders, false, senders.options.novalidate);
senders.clicked = false;
}
else {
senders.getRoot().getInstanceManager().submit(buttonId);
}

View File

@ -699,9 +699,18 @@ export class et2_dialog extends et2_widget {
var egw = _senders instanceof et2_widget ? _senders.egw() : et2_dialog._create_parent().egw();
var callbackDialog = function (button_id) {
if (button_id == et2_dialog.YES_BUTTON) {
if (_postSubmit) {
senders.getRoot().getInstanceManager().postSubmit(buttonId);
} else {
if (_postSubmit)
{
senders.getRoot().getInstanceManager().postSubmit(buttonId);
}
else if (senders.instanceOf(et2_button) && senders.getType() !== "buttononly")
{
senders.clicked = true;
senders.getInstanceManager().submit(senders, false, senders.options.novalidate);
senders.clicked = false;
}
else
{
senders.getRoot().getInstanceManager().submit(buttonId);
}
}