add form_evolution to variables
This commit is contained in:
parent
c2587d6467
commit
c4b0df810f
|
@ -252,6 +252,8 @@ class FormData(StorableObject):
|
|||
if d['form_status'] == d['form_previous_status']:
|
||||
d['form_status_changed'] = True
|
||||
|
||||
d['form_evolution'] = self.formdef.get_detailed_evolution(self)
|
||||
|
||||
d.update(self.formdef.get_substitution_variables())
|
||||
|
||||
if self.formdef.workflow and self.status:
|
||||
|
|
|
@ -925,8 +925,11 @@ def template_on_formdata(formdata, template, process=None):
|
|||
else:
|
||||
dict['comment'] = ''
|
||||
dict.update(formdata.get_as_dict())
|
||||
|
||||
# compatibility vars
|
||||
dict['before'] = dict.get('form_previous_status')
|
||||
dict['after'] = dict.get('form_status')
|
||||
dict['evolution'] = dict.get('form_evolution')
|
||||
|
||||
if process:
|
||||
for key in dict:
|
||||
|
|
Loading…
Reference in New Issue