Implement field order for the action dynamic forms.
Perform action class validation by importing the class and not relying on an instance of action model, which might not exisit when still creating the action. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -76,7 +76,12 @@ class WorkflowAction(six.with_metaclass(WorkflowActionMetaclass, WorkflowActionB
|
||||
self.form_data = form_data
|
||||
|
||||
def get_form_schema(self, request=None):
|
||||
return {
|
||||
result = {
|
||||
'fields': self.fields or (),
|
||||
'widgets': getattr(self, 'widgets', {})
|
||||
}
|
||||
|
||||
if hasattr(self, 'field_order'):
|
||||
result['field_order'] = self.field_order
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user