comparison sat/tools/xml_tools.py @ 2741:1797671827b9

tools (xml_tools): isXMLUICancelled helper function to check if an XMLUI has been cancelled from raw XML.
author Goffi <goffi@goffi.org>
date Thu, 03 Jan 2019 20:49:21 +0100
parents 5c2ed8a5ae22
children 5a51c7fc74a5
comparison
equal deleted inserted replaced
2740:8fd8ce5a5855 2741:1797671827b9
325 @return: unicode 325 @return: unicode
326 """ 326 """
327 return u"%s%s" % (SAT_FORM_PREFIX, name) 327 return u"%s%s" % (SAT_FORM_PREFIX, name)
328 328
329 329
330 def isXMLUICancelled(raw_xmlui):
331 """Tell if an XMLUI has been cancelled by checking raw XML"""
332 return C.bool(raw_xmlui.get(u'cancelled', C.BOOL_FALSE))
333
334
330 def XMLUIResultToElt(xmlui_data): 335 def XMLUIResultToElt(xmlui_data):
331 """Construct result domish.Element from XMLUI result. 336 """Construct result domish.Element from XMLUI result.
332 337
333 @param xmlui_data (dict): data returned by frontends for XMLUI form 338 @param xmlui_data (dict): data returned by frontends for XMLUI form
334 @return: domish.Element 339 @return: domish.Element