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:
@@ -54,17 +54,10 @@ class HTTPPostAction(WorkflowAction):
|
||||
}
|
||||
}
|
||||
|
||||
def __init__(self, url=None, payload=None):
|
||||
self.url = url
|
||||
self.payload = payload
|
||||
|
||||
def get_form_schema(self, request):
|
||||
return {
|
||||
'fields': self.fields,
|
||||
'widgets': self.widgets
|
||||
}
|
||||
|
||||
def execute(self, context):
|
||||
self.url = self.form_data.get('url')
|
||||
self.payload = self.form_data.get('payload')
|
||||
|
||||
try:
|
||||
url = Template(self.url).render(
|
||||
context=Context(context)
|
||||
|
||||
Reference in New Issue
Block a user