comparison frontends/src/tools/xmlui.py @ 1985:9ad1a06ed0f8

frontends (xmlui): cancelling form now trigger submit with {"cancelled": "true"} instead of being silently ignored
author Goffi <goffi@goffi.org>
date Wed, 29 Jun 2016 13:51:39 +0200
parents 2daf7b4c6756
children db3bbbd745e4
comparison
equal deleted inserted replaced
1984:de4fac507dc4 1985:9ad1a06ed0f8
661 self._xmluiClose() 661 self._xmluiClose()
662 662
663 def onFormCancelled(self, ignore=None): 663 def onFormCancelled(self, ignore=None):
664 """Called when a form is cancelled""" 664 """Called when a form is cancelled"""
665 log.debug(_("Cancelling form")) 665 log.debug(_("Cancelling form"))
666 if self.submit_id is not None:
667 data = {C.XMLUI_DATA_CANCELLED: C.BOOL_TRUE}
668 self.submit(data)
669 else:
670 log.warning(_("The form data is not sent back, the type is not managed properly"))
666 self._xmluiClose() 671 self._xmluiClose()
667 672
668 def onSaveParams(self, ignore=None): 673 def onSaveParams(self, ignore=None):
669 """Params are saved, we send them to backend 674 """Params are saved, we send them to backend
670 675