Improve the transition trigger list view

Display event type namespaces in the transition trigger view.
Sort events type list in the transition trigger view.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-06-09 01:58:43 -04:00
parent 8c96567094
commit e5c92487de
4 changed files with 17 additions and 3 deletions

View File

@@ -113,6 +113,10 @@ class WorkflowTransitionForm(forms.ModelForm):
class WorkflowTransitionTriggerEventRelationshipForm(forms.Form):
namespace = forms.CharField(
label=_('Namespace'), required=False,
widget=forms.TextInput(attrs={'readonly': 'readonly'})
)
label = forms.CharField(
label=_('Label'), required=False,
widget=forms.TextInput(attrs={'readonly': 'readonly'})
@@ -130,6 +134,7 @@ class WorkflowTransitionTriggerEventRelationshipForm(forms.Form):
*args, **kwargs
)
self.fields['namespace'].initial = self.initial['event_type'].namespace
self.fields['label'].initial = self.initial['event_type'].label
relationship = self.initial['transition'].trigger_events.filter(