From e6d0701a661114c2373b8ef0207358351ae9190b Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 29 Mar 2004 21:29:58 +0000 Subject: [PATCH] added listbox parameter when we want to start a script git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@630 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/skins/erp5_core/base_dialog.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/product/ERP5/skins/erp5_core/base_dialog.py b/product/ERP5/skins/erp5_core/base_dialog.py index 978abb4878..19b6e9cd18 100755 --- a/product/ERP5/skins/erp5_core/base_dialog.py +++ b/product/ERP5/skins/erp5_core/base_dialog.py @@ -1,4 +1,4 @@ -##parameters=form_id,cancel_url,dialog_method,selection_name,dialog_id +##parameters=form_id,cancel_url,dialog_method,selection_name,dialog_id,**kw # Updates attributes of an Zope document # which is in a class inheriting from ERP5 Base @@ -46,6 +46,14 @@ try: import_file = kw['import_file'] return getattr(context,dialog_method)(**kw) if has_listbox: + listbox_line_list = [] + listbox = getattr(request,'listbox',None) + for key in listbox.keys(): + listbox_line = listbox[key] + listbox_line['listbox_key'] = key + listbox_line_list.append(listbox[key]) + listbox_line_list = tuple(listbox_line_list) + kw['listbox'] = listbox_line_list return getattr(context,dialog_method)(**kw) url_params_string = make_query(kw) except FormValidationError, validation_errors: -- 2.30.9