mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Fix webcomponents with validation errors did not get tab activated
This commit is contained in:
parent
fb423b4efc
commit
3c96eb9ce6
@ -1561,22 +1561,22 @@ export class etemplate2
|
||||
{
|
||||
(<et2_baseWidget>widget).showMessage(_response.data[id], 'validation_error');
|
||||
|
||||
// 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')
|
||||
{
|
||||
tmpWidget = tmpWidget.getParent();
|
||||
}
|
||||
//Acvtivate the tab where the widget with validation error is located
|
||||
if(tmpWidget.getType() == 'tabbox')
|
||||
{
|
||||
(<et2_tabbox><unknown>tmpWidget).activateTab(widget);
|
||||
}
|
||||
}
|
||||
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')
|
||||
{
|
||||
tmpWidget = tmpWidget.getParent();
|
||||
}
|
||||
//Acvtivate the tab where the widget with validation error is located
|
||||
if(tmpWidget.getType() == 'tabbox')
|
||||
{
|
||||
(<et2_tabbox><unknown>tmpWidget).activateTab(widget);
|
||||
}
|
||||
}
|
||||
egw().debug("warn", "Validation errors", _response.data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user