Pass the action dynamic form data to the class as a standard form_class

argument.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-26 02:00:22 -04:00
parent 718a49437a
commit 7fdd816a1a
4 changed files with 13 additions and 50 deletions

View File

@@ -68,6 +68,9 @@ class WorkflowAction(six.with_metaclass(WorkflowActionMetaclass, WorkflowActionB
app.name, exception
)
def __init__(self, form_data=None):
self.form_data = form_data
def get_form_schema(self, request=None):
return {
'fields': self.fields or (),