frontends (xmlui): cancelling form now trigger submit with {"cancelled": "true"} instead of being silently ignored
This commit is contained in:
parent
a0fb3b451f
commit
25bbaa705a
1 changed files with 5 additions and 0 deletions
|
|
@ -663,6 +663,11 @@ class XMLUIPanel(XMLUIBase):
|
|||
def onFormCancelled(self, ignore=None):
|
||||
"""Called when a form is cancelled"""
|
||||
log.debug(_("Cancelling form"))
|
||||
if self.submit_id is not None:
|
||||
data = {C.XMLUI_DATA_CANCELLED: C.BOOL_TRUE}
|
||||
self.submit(data)
|
||||
else:
|
||||
log.warning(_("The form data is not sent back, the type is not managed properly"))
|
||||
self._xmluiClose()
|
||||
|
||||
def onSaveParams(self, ignore=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue