core (xmlui): fixed deferConfirm

This commit is contained in:
Goffi 2015-12-15 12:41:07 +01:00
commit 18b1ca3d31

View file

@ -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"""