From 18b1ca3d31d77ec8c408969a55c73e5233ee0c2d Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 15 Dec 2015 12:41:07 +0100 Subject: [PATCH] core (xmlui): fixed deferConfirm --- src/tools/xml_tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index 227cc33b..99c75bc8 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -1290,7 +1290,7 @@ def deferXMLUI(host, xmlui, action_extra=None, security_limit=C.NO_SECURITY_LIMI return xmlui_d def deferDialog(host, message, title=u'Please confirm', type_=C.XMLUI_DIALOG_CONFIRM, options=None, - action_extra=None, security_limit=C.NO_SECURITY_LIMIT, profile=C.PROF_KEY_NONE): + action_extra=None, security_limit=C.NO_SECURITY_LIMIT, chained=False, profile=C.PROF_KEY_NONE): """Create a submitable dialog and manage it with a deferred @param message(unicode): message to display @@ -1300,6 +1300,8 @@ def deferDialog(host, message, title=u'Please confirm', type_=C.XMLUI_DIALOG_CON @param action_extra(None, dict): extra action to merge with xmlui mainly used to add meta informations (see actionNew doc) @param security_limit: %(doc_security_limit)s + @param chained(bool): True if the Deferred result must be returned to the frontend + useful when backend is in a series of dialogs with an ui @param profile: %(doc_profile)s @return (dict): Deferred dict """ @@ -1308,7 +1310,7 @@ def deferDialog(host, message, title=u'Please confirm', type_=C.XMLUI_DIALOG_CON if options is not None: dialog_opt.update(options) dialog = XMLUI(C.XMLUI_DIALOG, title=title, dialog_opt=dialog_opt, submit_id='') - return deferXMLUI(host, dialog, action_extra, security_limit, profile) + return deferXMLUI(host, dialog, action_extra, security_limit, chained, profile) def deferConfirm(*args, **kwargs): """call deferDialog and return a boolean instead of the whole data dict"""