mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 21:13:23 +01:00
Handle validation_error if widget is children of a tabbox.
-Fix widget with validation error does not activate its related tab.
This commit is contained in:
parent
80cd11972a
commit
6af247558a
@ -949,6 +949,16 @@ function etemplate2_handle_validation_error(_type, _response)
|
||||
if(widget)
|
||||
{
|
||||
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
|
||||
var tmpWidget = widget;
|
||||
while(tmpWidget._parent && tmpWidget._type != 'tabbox')
|
||||
{
|
||||
tmpWidget = tmpWidget._parent;
|
||||
}
|
||||
//Acvtivate the tab where the widget with validation error is located
|
||||
if (tmpWidget._type == 'tabbox') tmpWidget.activateTab(widget);
|
||||
|
||||
}
|
||||
}
|
||||
egw().debug("warn","Validation errors", _response.data);
|
||||
|
Loading…
Reference in New Issue
Block a user