Mercurial > libervia-backend
changeset 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 | 8fd8ce5a5855 |
children | 1f5b02623355 |
files | sat/tools/xml_tools.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/tools/xml_tools.py Wed Jan 02 18:50:57 2019 +0100 +++ b/sat/tools/xml_tools.py Thu Jan 03 20:49:21 2019 +0100 @@ -327,6 +327,11 @@ return u"%s%s" % (SAT_FORM_PREFIX, name) +def isXMLUICancelled(raw_xmlui): + """Tell if an XMLUI has been cancelled by checking raw XML""" + return C.bool(raw_xmlui.get(u'cancelled', C.BOOL_FALSE)) + + def XMLUIResultToElt(xmlui_data): """Construct result domish.Element from XMLUI result.