# HG changeset patch # User Thierry Florac # Date 1523439861 -7200 # Node ID d272d5dc4cb70c0e7cd7145683c487bf703e36ca # Parent e19b3b60f4fdd9dc9d9195297f472736dd73e336 Don't use standard hard-coded form and widgets prefix diff -r e19b3b60f4fd -r d272d5dc4cb7 src/pyams_workflow/zmi/transition.py --- a/src/pyams_workflow/zmi/transition.py Wed Apr 11 11:43:39 2018 +0200 +++ b/src/pyams_workflow/zmi/transition.py Wed Apr 11 11:44:21 2018 +0200 @@ -38,7 +38,8 @@ def transition(self): parent = get_parent(self.context, IWorkflowManagedContent) workflow = query_utility(IWorkflow, name=parent.workflow_name) - return workflow.get_transition_by_id(self.request.params.get('form.widgets.transition_id')) + return workflow.get_transition_by_id(self.request.params.get( + '{0}{1}transition_id'.format(self.prefix, self.widgets.prefix))) @property def legend(self): @@ -59,7 +60,8 @@ super(WorkflowContentTransitionForm, self).updateWidgets(prefix) if 'transition_id' in self.widgets: self.widgets['transition_id'].mode = HIDDEN_MODE - self.widgets['transition_id'].value = self.request.params.get('form.widgets.transition_id') + self.widgets['transition_id'].value = self.request.params.get( + '{0}{1}transition_id'.format(self.prefix, self.widgets.prefix)) if 'comment' in self.widgets: self.widgets['comment'].widget_css_class = 'textarea'