Fix webcomponents with validation errors did not get tab activated

This commit is contained in:
nathan 2022-07-14 11:37:29 -06:00
parent fb423b4efc
commit 3c96eb9ce6

View File

@ -1561,6 +1561,11 @@ export class etemplate2
{
(<et2_baseWidget>widget).showMessage(_response.data[id], 'validation_error');
}
else if(typeof widget.set_validation_error == "function")
{
widget.set_validation_error(_response.data[id]);
}
// Handle validation_error (messages coming back from server as a response) if widget is children of a tabbox
let tmpWidget = widget;
while(tmpWidget.getParent() && tmpWidget.getType() != 'tabbox')
@ -1573,11 +1578,6 @@ export class etemplate2
(<et2_tabbox><unknown>tmpWidget).activateTab(widget);
}
}
else if(typeof widget.set_validation_error == "function")
{
widget.set_validation_error(_response.data[id]);
}
}
egw().debug("warn", "Validation errors", _response.data);
}