Mercurial > libervia-backend
changeset 2429:941fdf81958c
core (XMLUI): form's XMLUI is use as first arguments for filters in dataForm2Widgets
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 11 Nov 2017 18:39:26 +0100 (2017-11-11) |
parents | c2d88fe05303 |
children | 3faf18111d61 |
files | src/tools/xml_tools.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tools/xml_tools.py Sat Nov 11 18:39:24 2017 +0100 +++ b/src/tools/xml_tools.py Sat Nov 11 18:39:26 2017 +0100 @@ -113,8 +113,8 @@ be added first to the container. @param filters(dict, None): if not None, a dictionary of callable: key is the name of the widget to filter - the value is a callable, it will get widget's type, args and kwargs - and must return the same variable, which it can modify + the value is a callable, it will get form's XMLUI, widget's type, args and kwargs + and must return widget's type, args and kwargs (which can be modified) This is especially useful to modify well known fields @return: the completed XMLUI instance """ @@ -136,7 +136,7 @@ except KeyError: pass else: - widget_type, widget_args, widget_kwargs = widget_filter(widget_type, widget_args, widget_kwargs) + widget_type, widget_args, widget_kwargs = widget_filter(form_ui, widget_type, widget_args, widget_kwargs) label = field.label or field.var if label: form_ui.addLabel(label)